Python: Difference between revisions
Add more details on uv installation as usage |
Add Installing Multiple Versions |
||
Line 653: | Line 653: | ||
<code>pythonDebug = pkgs.python310.override { enableDebug = true; };</code> | <code>pythonDebug = pkgs.python310.override { enableDebug = true; };</code> | ||
== Installing Multiple Versions == | |||
{{Nixpkgs Manual|name={{ic|lib.meta.lowPrio}} and {{ic|lib.meta.highPrio}}|anchor=#function-library-lib.meta.lowPrio}} can be used to install multiple versions without conflicts ({{issue|369997}}): | |||
{{file|/etc/nixos/configuration.nix|nix|3= | |||
environment.systemPackages = with pkgs; [ | |||
python313 | |||
lib.meta.lowPrio python314 | |||
]; | |||
}} | |||
In this case you may run Python 3.13 via {{ic|python}} or {{ic|python3.13}} and Python 3.14 via {{ic|python3.14}}. | |||
{{Note|If you wrapped Python as described in [[#Running_Python_packages_which_requires_compilation_and/or_contains_libraries_precompiled_without_nix]], call {{ic|lib.meta.lowPrio}} and {{ic|lib.meta.highPrio}} for the wrapped Python instead of calling them inside the wrapping.}} | |||
== Performance == | == Performance == |