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 这个改大一些否则有可能报错