jupyter notebook添加虚拟环境(之前用的时候没有那么多问题啊,不过好在一天一夜终于解决了)
我只是想在jupyter中添加我创建的虚拟环境,but,虚拟环境倒是添加到jupyter的列表里了,可是,选中虚拟环境的内核人家就是连不上网络,哎,就是这么气人。
一气之下,把anaconda卸载重新下载,可是…
1.jupyter闪退。用了这个博主的方法解决了。
https://www.jianshu.com/p/890684f89540
2.Bad file descriptor (D:\bld\zeromq_1605919615529\work\src\epoll.cpp:100)
尝试了无数种方法,我好怕我的电脑被我配置乱掉。后来这个方法才是适合我的:
(1)pip install --upgrade --force-reinstall --no-cache-dir jupyter重新安装jupyter。
(2)当安装jupyter notebook的时候,会自动安装ipykernel, 然后自动安装了高版本的pyzmq.
此问题是pyzmq版本问题,卸载pyzmq ,然后终端执行:pip install pyzmq==19.0.2
终于解决问题了。
呜呜,时隔一天,又出现问题。
下载完torch后import报错 OSError: [WinError 126] 找不到指定的模块。 Error loading “D:\Anaconda\envs\tensorflow\lib\site-packages\torch\lib\torch_python.dll” or one of its dependencies.
最终解决方法:conda update --all
总算可以跑代码了唉