Python is already on NixOS

Another discovery today!!! :rofl:

Python has been installed on NixOS all along. (I can find it in my oldest still running version which is 23.11. :shushing_face: That remains my most stable and consistent installation of NixOS!)

… but it isn’t in /run/current/sw/bin/:

$ python --version
bash: python: command not found

$ /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/bin/python --version
Python 3.13.9

I don’t use python myself, but someone asked me about installing and running it on NixOS and I ran into a number of version type issues when I set it up.

Can anyone help me understand why there are circa 600 python packages in my /nix/store but there is no reference to anything python in /run/current/sw/bin?

Also, given these packages are all locally available does this in anyway change how you would ‘install’ python? What about if you want a different python version?

https://nix.dev/tutorials/first-steps/declarative-shell#declarative-reproducible-envs

Thanks @waffle8946. I followed that tutorial.

$ nix-shell
 _____________                                                                                        
< Hello, Nix! >
 -------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||