- First setup devenv and direnv on your computer
git clone https://github.com/abelREK/devenv_python_data_science_example
direnv allow
- First check Nix Packages if the nix version of the package exists.
- If it does you should install that over the pip one. Search using python "name of library". Use the python 3.11 version.
- Add the package to your packages array in the devenv.nix file.
- If the package does not exist install the pip version by adding the name of the library to your requirements.txt file on a new line.
- You may have to use the command
direnv reload
for the change to kick in. - Enjoy your python virtual environment.
- For more information on devenv visit Devenv Docs
- Run
devenv init
in the new project folder. - Copy over the devenv.nix, devenv.yaml, and requirements.txt.