

However, this may fail if your conda environment is created as a sub-directory of your project's directory (which we recommend) Note: alternatively, you can use conda env export > all_requirements.txt, which will save both: packages installed by conda and by pip.
#CONDA CREATE VIRTUAL ENVIRONMENT INSTALL#
penv -file conda_requirements.txt pip install -r pip_requirements.txt In this you can use export PYTHONNOUSERSITE=True # to ingnore packages in ~/.local/lib/python # save conda list -export > conda_requirements.txt pip freeze > pip_requirements.txt # restore conda create -p. If you installed extra packages using pip (Python) Important: This will not list packages installed by pip or install.packages()

Save a list of packages (so you are able to report environment in publication, and to restore/reproduce env on another machine at any time) # saveĬonda create -p. To overcome this, do " export PYTHONNOUSERSITE=True " after conda activate (this behaviour is the same for packages installed by to ~/.local/lib/python before or after you create your conda environment ) When you will do "conda activate" you will have tornado v.6 available!! Not v.5!! Let say you have tornado v.6 installed in ~/.local/lib/python, and tornado v.5 installed by "conda install". If you did use ' pip install -user ' to install some packages (without conda or other virtual environment), they will be available in ~/.local/lib/python

Important: conda and packages install by default to ~/.local/lib/python Other packages may be installed (and compiled when needed) using pip pip install Install pre-compiled packages available in conda: mkdir /home//.conda mkdir /scratch//conda_pkgs ln -s /scratch//conda_pkgs /home//.conda/pkgs
#CONDA CREATE VIRTUAL ENVIRONMENT DOWNLOAD#
penv python=3 # environment will be created in project directoryĪlso, you need to create a symbolic link, so conda will download files for packages to be installed into scratch, not your home directory. This will keep all the files inside the project's directory, instead of putting in in your /home/$USER conda create -p. IMPORTANT : keep your program/project in /scratch and create conda environment using '-p' parameter.
