How to copy the Anaconda directory to another location and make it work?

1

The situation is that, I'm using a server which can only access LAN, and I want to migrate an existing Anaconda environment to another directory. And the reason why I'm doing this is because there are so many required packages installed on that environment, and I really do not want to download and install those packages again :(

Since all the procedures are without internet connection, I cannot just simply use commands like conda create --clone, or export and import .yml files. Thus these answers are not helpful.

I tried copying the whole folder (recursively) directly to the new location. Although the symbolic links are migrated correctly, multiple files containing the location (writing at the first line inside these files) are not correct, such as in bin/conda:

#!/data/home/username/anaconda3/bin/python

where the path is incorrect.

I found some discussions here, but still cannot figure out a way to solve the problem.

Obsidian

Posted 2019-06-12T05:46:15.033

Reputation: 11

So edit the files and correct the broken shebang? – DavidPostill – 2019-06-12T06:47:01.693

No answers