首先,运行jupyter notebook有这么几种方法,遇到标题提到的问题的时候,可以首先试试。
1.开始-Anaconda3-Anaconda Navigator-点击"jupyter notebook"下的"launch"
2.开始-Anaconda Prompt
在打开的命令提示符里输入"jupyter notebook"
3.开始-Jupyter Notebook
4.找到"C:\ProgramData\Anaconda3\Scripts"目录下的"jupyter-notebook.exe",点击打开
遇到的问题:以上所有打开jupyter notebook的方法,结果都是,显示一直在打开中,然后不能自动打开浏览器,手动输入地址"localhost:8888"也不能打开。
找了网站上很多种解决方法,例如修改jupyter notebook的默认浏览器、指定localhost的地址、更新jupyter notebook的版本、更新conda的版本......各种办法,都没有解决问题。
解决方法:其实这个问题是因为防火墙没有允许python通过。需要从"控制面板\系统和安全\Windows Defender 防火墙"里设置
这个地方有点不理解,直接设置白名单不可以,但是每次开机后,关开防火墙后,就可以正常打开jupyter notebook。
虽然不是很理解原理,但是这样可以解决这个问题:在打开jupyter notebook之前,先关开一次防火墙(当然,关了之后不打开的话,重启也可以正常打开jupyter notebook)
本来之前是以为添加了白名单就可以解决问题,但是我找了很久,都没有解决,目前只有上述,关开一次防火墙,可以解决问题。有看到这个问题的大神,如果能彻底解决这个问题,希望能指教一下。
关开防火墙后,可以通过上面提到的四种方法运行jupyter notebook,会自动打开浏览器,然后正确链接上了。








暂无数据