anaconda使用activate出现错误怎么办?
Anaconda使用conda activate激活环境出错
错误如下:
CommandNotFoundError:Yourshellhasnotbeenproperlyconfiguredtouse'condaactivate'. IfyourshellisBashoraBournevariant,enablecondaforthecurrentuserwith $echo"./home/ubuntu/anaconda3/etc/profile.d/conda.sh">>~/.bashrc or,forallusers,enablecondawith $sudoln-s/home/ubuntu/anaconda3/etc/profile.d/conda.sh/etc/profile.d/conda.sh Theoptionsabovewillpermanentlyenablethe'conda'command,buttheydoNOT putconda'sbase(root)environmentonPATH.Todoso,run $condaactivate inyourterminal,ortoputthebaseenvironmentonPATHpermanently,run $echo"condaactivate">>~/.bashrc Previoustoconda4.4,therecommendedwaytoactivatecondawastomodifyPATHin your~/.bashrcfile.Youshouldmanuallyremovethelinethatlookslike exportPATH="/home/ubuntu/anaconda3/bin:$PATH" ^^^TheabovelineshouldNOLONGERbeinyour~/.bashrcfile!^^^
这是由于conda的激活命令出了问题,解决方法如下:
#激活环境 sourceactivate #退出环境 sourcedeactivate
随后解决问题。
可以进行激活环境了:
condaactivateyour-env-name
本网站文章仅供交流学习 ,不作为商用, 版权归属原作者,部分文章推送时未能及时与原作者取得联系,若来源标注错误或侵犯到您的权益烦请告知,我们将立即删除.