Python: Difference between revisions
imported>Mic92 No edit summary |
imported>Mic92 No edit summary |
||
| Line 1: | Line 1: | ||
== | == System-wide installation == | ||
The Python packages available to the interpreter must be declared when installing Python. | The Python packages available to the interpreter must be declared when installing Python. | ||
| Line 6: | Line 6: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
environment.systemPackages = | environment.systemPackages = let | ||
myPythonPackages = pythonPackages: with pythonPackages; [ | |||
pandas | |||
requests | |||
# other python packages you want | |||
]; | ]; | ||
in | in with pkgs; [ | ||
with pkgs; [ | |||
(python3.withPackages myPythonPackages) | (python3.withPackages myPythonPackages) | ||
# all your other (non-Python) packages | # all your other (non-Python) packages | ||