除了anaconda文件迁移外,还有环境变量要改:
vim ~/.bashrc
改anaconda相关目录
source ~/.bashrc
vim /newpath/anaconda3/bin/pip
vim /newpath/anaconda3/bin/conda
vim /newpath/anaconda3/etc/profile.d/conda.sh
sh /newpath/anaconda3/etc/profile.d/conda.sh
如果此时输入conda无反应,重新打开终端
此时conda好用了,但是conda activate命令未识别
提示 echo ". /newpath/anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc
然后conda activate好用了
安装包会遇到:
SafetyError: The package for libmklml located at /oldpath/.conda/pkgs/libmklml-2019.0.5-0
appears to be corrupted. The path 'lib/libmklml_gnu.so'
has a sha256 mismatch.
reported sha256: 9007d35938f166a9f698dd002b910f0eeff1de542976f7a8cfc329fb8c1a2c5e
actual sha256: e8fbd3cc7aebf7b59e666fa8331ba0bf0d25398714fa0236840c5885791a62cc
CondaVerificationError: The package for libmklml located at /oldpath/.conda/pkgs/libmklml-2019.0.5-0
appears to be corrupted. The path 'lib/libmklml_intel.so'
specified in the package manifest cannot be found.
清理包缓存即可
conda clean --packages --tarballs