005 Conda environment migration 环境迁移

  1. Install conda-pack on the source machine by running below command in terminal.

pip install conda-pack

  1. Pack the environment on the old machine by running below command in terminal. You'll get file like 'test.tar.gz'.

conda pack --name test --ignore-editable-packages

  1. Install conda on the target machine.

./Anaconda3-2019.10-Linux-x86_64.sh

  1. Unpack the environment file on the target machine

mkdir -p test
tar -xzf test.tar.gz -C test

  1. Activate the environment

source test/bin/activate

  1. Cleanup prefixes from in the active environment

conda-unpack

  1. Enter 'python' to test the envirnment.

python

你可能感兴趣的:(005 Conda environment migration 环境迁移)