Python: Difference between revisions

Tetov (talk | contribs)
m m: s/buildFHSUserEnv/buildFHSEnv/g https://github.com/NixOS/nixpkgs/blob/93837d788cda788e660bc5db731bec9f6df4a6cb/nixos/doc/manual/release-notes/rl-2305.section.md?plain=1#L210
Drupol (talk | contribs)
m Add an example of using the new command line to spawn a shell with python and custom modules.
Line 40: Line 40:
];
];
</syntaxhighlight>
</syntaxhighlight>
=== Using Nix shell (new command line) ===
nix shell --impure --expr '(import <nixpkgs> {}).python3.withPackages (ps: with ps; [ swh-core swh-scanner ])'
If you don't use the channels any more, you can replace <code><nixpkgs></code> by an instance of the <code>NixOS/nixpkgs</code> repository using its absolute path.


==== Using a Python package not in Nixpkgs ====
==== Using a Python package not in Nixpkgs ====