How can I install a conda environment when offline?

后端 未结 10 1831
-上瘾入骨i
-上瘾入骨i 2020-12-07 20:32

I would like to create a conda environment on a machine that has no network connection. What I\'ve done so far is:

On a machine that is connected to the internet:

10条回答
  •  心在旅途
    2020-12-07 21:27

    Here's what worked for me in Linux -

    (a) Create a blank environment - Just create an empty directory under $CONDA_HOME/envs. Verify with - conda info --envs.

    (b) Activate the new env - source activate

    (c) Download the appropriate package (*.bz2) from https://anaconda.org/anaconda/repo on a machine with internet connection and move it to the isolated host.

    (d) Install using local package - conda install . For example - conda install python-3.6.4-hc3d631a_1.tar.bz2, where python-3.6.4-hc3d631a_1.tar.bz2 exists in the current dir.

    That's it. You can verify by the usual means (python -V, conda list -n ). All related packages can be installed in the same manner.

提交回复
热议问题