搜集资料,这个报错可能是因为 python pyzmq 插件的版本与其他依赖插件不匹配导致。
pyzmq 的版本变更可以在这里查看 https://pyzmq.readthedocs.io/en/latest/
卸载插件,然后制定安装一个低版本的尝试下。
CMD里输入
pip uninstall pyzmq
pip install pyzmq==19.0.2
!,就解决了
pip install pyzmq==19.0.2 25.1.0
pip install pywinpty==1.1.6 2.0.9
pip install pyqtwebengine==5.12.1 5.15.4
pip install pyqt5==5.12.3 5.15.7
pip install pyzmq==19.0.2
pip install pywinpty==1.1.6
pip install pyqtwebengine==5.12.1
pip install pyqt5==5.12.3
pip install pyzmq==19.0.2
pip install pywinpty==1.1.6
pip install pyqtwebengine==5.12.1
pip install pyqt5==5.12.3
2022.10版本应该安装哪些版本
pip install pyzmq==25.1.0
pip install pywinpty==2.0.9
pip install pyqtwebengine==5.12.1
pip install pyqt5==5.12.3
pip install pyzmq==25.1.0
pip install pywinpty==2.0.9
pip install pyqtwebengine==5.12.1
pip install pyqt5==5.15.2
23年版本安装哪个
pip install pyzmq==25.1.0
pip install pywinpty==2.0.9
pip install pyqtwebengine==5.15.5
pip install pyqt5==5.15.5
开始是运行没有提示,后面是内核挂掉了,考虑是版本冲突
在Anaconda prompt里输入jupyter nootbook结果打不开,提示有个文件XX的,删除掉后打开了
markupsafe这有点问题
重装anaconda后jupyter能打开,安装tensorflow后打不开,
然后重装anaconda新建一个环境放tensorflow能打开
在环境输入pip check 可以检查环境里什么不兼容
不弹出浏览器
需要
1、win+r 然后输入cmd,回车打开命令窗口
2、在命令窗口中输入jupyter notebook --generate-config,回车,有的电脑会提示输入y/N,输入y,回车
找到jupyter notebook --generate-config的路径
找到jupyter notebook --generate-config文件,用记事本打开
查找(ctrl+F) c.NotebookApp.password=找到其所在位置
在其所在下一行输入
import webbrowser
webbrowser.register("chrome", None, webbrowser.GenericBrowser(r'C:\Program Files(x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = "chrome"
将这两个""换为英文的"",在这个里面看不出来,需要换,然后打开这个路径看看能不能打开浏览器,这个路径就是浏览器的路径
chrome就是浏览器的名字
jupyter自由切换anaconda环境
conda env list
conda activate <环境名称>
conda install ipykernel
python -m ipykernel install --user --name your_env --display-name "your_display"
①your_env 是你的conda环境名称
②your_display:将是你在notebook中看到的名称。
5.打开jupyter notebook>kernel>change kernel。选择环境即可。
python -m ipykernel install --user --name YYY --display-name "YY"
python -m ipykernel install --user --name PY310 --display-name "PY3108"
python -m ipykernel install --user --name PY39 --display-name "PY3912"
python -m ipykernel install --user --name PY38 --display-name "PY3810"
python -m ipykernel install --user --name PY37 --display-name "PY379"
内核正在启动中,可能是
pyzmq的版本太高
pip install pyzmq==19.0.2
不是,没用还是显示在启动中
卸载anaconda后,搜索 conda,jupyter,将搜索到的文件删除,重装就可以了
spyder闪退
1.打开Anaconda Prompt,输入spyder --new-instance
spyder会启动,然后闪退…但Anaconda Prompt 会显示出错信息,
大致找到出错的库,然后重装库的版本,基本可以处理
卸载了spyder,重装了一个版本的spyder就成功了
2023版本的
pip install pyzmq==23.2.0 24.0.0 24.0.1
pip install pywinpty==1.1.6 2.0.1 2.0.2 2.0.5 2.0.9
pip install pyqtwebengine==5.12.1 5.15.3 5.15.5
pip install pyqt5==5.12.3 5.15.7 5.15.6
没成功
内核报错
Traceback (most recent call last):
File "D:\PY3\Anaconda3\lib\site-packages\tornado\web.py", line 1704, in _execute
result = await result
File "D:\PY3\Anaconda3\lib\asyncio\tasks.py", line 328, in __wakeup
future.result()
File "D:\PY3\Anaconda3\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "D:\PY3\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 74, in post
model = yield maybe_future(
File "D:\PY3\Anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "D:\PY3\Anaconda3\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "D:\PY3\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 98, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "D:\PY3\Anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "D:\PY3\Anaconda3\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "D:\PY3\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 110, in start_kernel_for_session
kernel_id = yield maybe_future(
File "D:\PY3\Anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "D:\PY3\Anaconda3\lib\asyncio\futures.py", line 201, in result
raise self._exception
File "D:\PY3\Anaconda3\lib\asyncio\tasks.py", line 256, in __step
result = coro.send(None)
File "D:\PY3\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 176, in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
File "D:\PY3\Anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 186, in start_kernel
km.start_kernel(**kwargs)
File "D:\PY3\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 337, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "D:\PY3\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 286, in pre_start_kernel
self.write_connection_file()
File "D:\PY3\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 466, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "D:\PY3\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 136, in write_connection_file
with secure_write(fname) as f:
File "D:\PY3\Anaconda3\lib\contextlib.py", line 119, in __enter__
return next(self.gen)
File "D:\PY3\Anaconda3\lib\site-packages\jupyter_core\paths.py", line 899, in secure_write
win32_restrict_file_to_user(fname)
File "D:\PY3\Anaconda3\lib\site-packages\jupyter_core\paths.py", line 446, in win32_restrict_file_to_user
win32security.SetFileSecurity(fname, win32security.DACL_SECURITY_INFORMATION, sd)
pywintypes.error: (87, 'SetFileSecurity', '参数错误。')
内核被占用