安装mitosheet时pyzmq编译失败(cl.exe退出码2)求助
问题:安装Mitosheet时pyzmq编译失败
我正在尝试安装mitosheet,并配置Jupyter相关依赖以实现.ipynb文件导出为PDF。
已成功操作
执行命令python3 -m pip install pyzmq --no-binary pyzmq手动编译安装pyzmq,成功构建并安装了wheel包,输出如下:
C:\Users\SHARV> python3 -m pip install pyzmq --no-binary pyzmq Defaulting to user installation because normal site-packages is not writeable Collecting pyzmq Downloading pyzmq-25.1.2.tar.gz (1.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 3.1 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: pyzmq Building wheel for pyzmq (pyproject.toml) ... done Created wheel for pyzmq: filename=pyzmq-25.1.2-cp312-cp312-win_amd64.whl size=672485 sha256=6d778259a71e1a4bef8e32a98a63cbd82977e27fbbb8b97afaebb5041aae648d Stored in directory: c:\users\sharv\appdata\local\pip\cache\wheels\b1\52\ef\086c3aa0c7f61df6c214d61fe7dad829198444748224f2603b Successfully built pyzmq Installing collected packages: pyzmq Successfully installed pyzmq-25.1.2
失败操作
执行python -m pip install mitosheet时安装失败,错误输出如下:
C:\Users\SHARV> python -m pip install mitosheet C:\\Program Files\\Python312\\include\\cpython/longintrepr.h(87): note: see declaration of '\_longobject'DEBUG EXT_SUFFIX '.cp312-win_amd64' '.cp312-win_amd64.pyd' \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nDEBUG EXT_SUFFIX '.cp312-win_amd64' '.cp312-win_amd64.pyd' \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\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 C:\\Users\\SHARV\>
已排查事项
- 所有相关路径已添加至系统环境变量
- 确认Visual Studio 2019和2022的cl.exe存在
- 当前环境为Python 3.12,已更新nbconvert、安装pandoc及MikTeX提供的Xelatex
- 已手动成功编译安装pyzmq,但安装mitosheet时仍触发pyzmq编译并失败
恳请提供解决思路。
内容的提问来源于stack exchange,提问作者Sharvin Soham
相关产品推荐
相关产品推荐

