Jupyter notebook 启动错误 “sys/un.h” No such file or directory
程序员文章站
2022-05-29 09:39:44
...
本文记录Jupyter notebook 启动错误 “sys/un.h” No such file or directory 的解决方案。
错误复现
在运行
jupyter notebook
命令时,报错如下:
> jupyter notebook
_cffi_ext.c
E:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(213): fatal error C1083: 无法打开包 括文件: “sys/un.h”: No such file or directory
Traceback (most recent call last):
File "E:\ProgramData\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "E:\ProgramData\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 46, in <module>
from zmq.eventloop import ioloop
File "E:\ProgramData\Anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "E:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "E:\ProgramData\Anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "E:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "E:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\select.py", line 27, in select_backend
mod = __import__(name, fromlist=public_api)
File "E:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed: 找不到指定的模块。
解决方案
- 卸载pyzmq
pip uninstall pyzmq
- 安装pyzmq
pip install pyzmq --user
- 重新启动 jupyter notebook
jupyter notebook