背景:近期update了anaconda的所有包,并设置了多个虚拟环境。
问题:启动terminal后,输入“jupyter notebook”无法打开jupyter,如下:
$ jupyter notebook
-bash: jupyter: command not found
1,临时解决方案:
(激活conda的base环境,下方路径是anaconda的安装路径)
$ source ~/anaconda3/bin/activate
(base) ccm ~
再输入“jupyter notebook”,就可以打开jupyter notebook界面了
2,终极解决方案:
(设置打开terminal默认进入base环境:在terminal中输入以下代码,并重启terminal)
$ conda config --set auto_activate_base true