【兼容调试】anaconda创建环境后与jupyter notebook的kernel

anaconda创建一个新环境后,比如python3.6, or用于pytorch or 用于tensorfow的新环境后,用Jupyter notebook要以当前环境的kernel运行编译,需要安装ipykernel,否则无法误测到jupyter notebook中,以新建pytorch的anaconda环境后的步骤如下:

#安装ipykernel
conda install ipykernel
#写入环境
python -m ipykernel install  --name pytorch --display-name "Pytorch for Deeplearning"

#切换回基础环境
activate base

#创建jupyter notebook配置文件
jupyter notebook --generate-config   
## 这里会显示创建jupyter_notebook_config.py的具体位置

然后记得打开文件,修改

c.NotebookApp.notebook_dir = '' 默认目录位置
c.NotebookApp.iopub_data_rate_limit = 100000000 这个改大一些否则有可能报错
发布了63 篇原创文章 · 获赞 13 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/changreal/article/details/96992169