Python

Cloning an existing Python environment using Conda 



What is a python environment? 
A python environment can be considered as a light-weight container for holding application-specific dependencies. 

How to see a list of all of your available python environments? 
conda info --env
conda env list 

Why do I need to clone an already available python environment? 
For me multiple environments are useful when I want to use applications which are not available in the base python distribution instaled our linux system by the administrator. I do not have write permissions to make changes to the python installation's site-packages directory. Therefore, I clone the original python environment to my home directory where I have write permission and I can install packages of my choice. 

How do I clone it? 
conda create --name myclone --clone myenv 

Where is the new environment created? 
The new python environment is cloned inside the "$HOME/.conda" directory. In case the amount of space on your $HOME directory is limited (say due to quota) you can create the clone by creating a soft link from "$HOME/.conda" to any other available disk location. 
ln -s /path/.conda $HOME/.conda

Comments

Popular posts from this blog

Latex Help