Anaconda 环境迁移
- install conda pack
conda install conda-pack
- make sure the local envs is activated
- pack local packages
conda pack -n my_env -o output_name.tar.gz
Notes: if show following errors
CondaPackError: Cannot pack an environment with editable packages
installed (e.g. frompython setup.py develop
or
pip install -e
). Editable packages found:
sloved by adding --ignore-editable-packages
, such as the following script
conda pack -n my_env -o output_name.tar.gz --ignore-editable-packages
- unpack the packages in new envs
mkdir -p some_env
tar -xzf output_name.tar.gz -C some_env
- activate envs
source some_env/bin/activate
- checking the python version in new envs
./some_env/bin/python
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。