How do I clone a conda environment into a specific folder?

Viewed 2504

The documentation states that cloning works this way:

conda create --name myclone --clone myenv

However, this will always default to creating the environment myclone into the home directory where I have little disk storage. I would like to have conda create a clone onto another path where I have a huge amount of storage.

I would have expected something like this to exist, but alas:

conda create --name myclone --clone myenv --destination /path/to/huge/storage

Also, the --path and --name cannot be used at the same time.

What are my options? I need to work with conda, that is changing my hardware infrastructure is not an option, in case you would suggest me to increase my home directory space etc.

Or are we dealing with a conda limitation here?

1 Answers

Navigate in the destination folder and open terminal window or use cd command directly from terminal to move there. Then:

$ conda create --prefix=myclone --clone myenv

Note that if your base enviroment is not in the default conda directory you have to specify the path replacing myenv with path/to/myenv.

Related