参考文献
参考文献1: Jupyter notebook切换Python环境
问题来源
经常需要使用anaconda的虚拟环境,使用jupyter进行切换是一个好方法。其它网友总结了对nb_conda方式解决,但实践过程中出了比较严重的错误。比如,jupyter崩溃等。
- 其它虚拟环境安装jupyter,打开提示IOloop
- 安装了多个nbextensions,提示重复yaml文件错误
- jupyter运行提示404等
解决
方式:仍然使用nb_conda插件解决的方式,但通过尝试多种方式,确定了最优的流程
1. 安装anaconda
略
2. base环境整理
- 安装jupyter notebook
- 安装jupyter_contrib_nbextensions
之前安装时,运行了jupyter contrib nbextensions install --user 之后运行jupyter 提示 重复yaml文件错误。可试运行,若报错,则jupyter contrib nbextensions uninstall --user - 安装 nb_conda
conda install nb_conda
3. 管理虚拟环境
整体思路为:在base环境下的jupyter中为各个虚拟环境安装ipykern