packaging environment
Install the conda-pack package
pip install conda-pack
packaging environment
conda pack -n 环境名
Generate a compressed file of environment name.tar.gz in the current path
Use scp to transfer the compressed file to another server ([email protected] port 60001)
scp -P 60001 环境名.tar.gz [email protected]:/home/wangyf/miniconda3/envs
Enter the miniconda/envs environment to manually create the environment name folder
cd miniconda3
cd envs
mkdir 环境名
Unzip the environment zip package to the folder you just created
tar -xvzf 环境名.tar.gz -C 环境名
Check if the environment is available
conda info -e
conda env list
conda activate 环境名
transfer item
Use scp to transfer the project folder to another server ([email protected] port 60001)
scp -P 60001 -r 项目名 [email protected]:/home/wangyf
Just wait for the transfer to complete
There may be situations where clear cannot be used
terminals database is inaccessible
If you only report errors in your own environment, but clear in base is normal, you need to enter the error environment
conda activate 环境名
which clear
/home/wangyf/miniconda3/envs/environment name/bin/clear
Enter the path where clear is located, rename clear, and generate a new clear next time
cd /home/wangyf/miniconda3/envs/环境名/bin
mv clear clear_old
Return to the base environment and execute clear
conda deactivate
clear
At this point a new clear will be generated
conda activate 环境名
clear
Now there will be no error