一、问题描述
anaconda安装后,spyder、jupyter无法运行,出现类似于如下报错
[W 2023-08-22 23:50:38.896 LabApp] Could not determine jupyterlab build status without nodejs
Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)
二、正确操作
#卸载pyzmq(在anaconda prompt中执行)
pip uninstall pyzmq
#安装最新版本
pip install pyzmq
三、可能错误
目前网络上查询到的方法大多如下:
#卸载高版本pyzmq(anaconda prompt中执行)
pip uninstall pyzmq
#安装老版本
pip install pyzmq==19.0.2
但是实际上往往会导致pyzmq的编译错误
Failed building wheel for pyzmq
building 'zmq.libzmq' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":
error: command 'D:\\Microsoft\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyzmq
Failed to build pyzmq
ERROR: Could not build wheels for pyzmq, which is required to install pyproject.toml-based projects
AttributeError: 'MSVCCompiler' object has no attribute '_vcruntime_redist'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyzmq
Running setup.py clean for pyzmq
Failed to build pyzmq
ERROR: Could not build wheels for pyzmq, which is required to install pyproject.toml-based projects
评论区