gpt4 book ai didi

python-3.x - cl.exe 失败,退出状态为 2

转载 作者:行者123 更新时间:2023-12-04 14:27:27 25 4
gpt4 key购买 nike

我到处寻找解决此错误的方法。我不是 Python 或编程方面的专家,但我遵循了各种建议但没有结果。

尝试将 cl.exe 添加到我的环境 PATH bot 用户和系统中。

在第一次运行命令并将其作为输出中的解决方案后,安装了 Microsoft Visual C++ 工具 2015。

还尝试安装 MinGW python 发行版,某处的一个线程推荐了它,但什么也没有。

不确定它是否是我使用的 CMD,所以在普通 Windows 和 Visual Studio 中的包管理器中都尝试过,同样的错误。

从我收集的信息来看,它是一个 Windows 问题,但我不知道在找到修复程序方面这意味着什么。

Microsoft Windows [Version 10.0.16299.192]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\User>pip install rebound
Collecting rebound
Using cached rebound-3.5.12.tar.gz
Building wheels for collected packages: rebound
Running setup.py bdist_wheel for rebound ... error
Complete output from command c:\users\user\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-build-h7n58o8k\\rebound\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\User\AppData\Local\Temp\tmpgvqt5nrzpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\rebound
copying rebound\data.py -> build\lib.win-amd64-3.6\rebound
copying rebound\debug.py -> build\lib.win-amd64-3.6\rebound
copying rebound\horizons.py -> build\lib.win-amd64-3.6\rebound
copying rebound\interruptible_pool.py -> build\lib.win-amd64-3.6\rebound
copying rebound\particle.py -> build\lib.win-amd64-3.6\rebound
copying rebound\plotting.py -> build\lib.win-amd64-3.6\rebound
copying rebound\simulation.py -> build\lib.win-amd64-3.6\rebound
copying rebound\simulationarchive.py -> build\lib.win-amd64-3.6\rebound
copying rebound\tools.py -> build\lib.win-amd64-3.6\rebound
copying rebound\units.py -> build\lib.win-amd64-3.6\rebound
copying rebound\widget.py -> build\lib.win-amd64-3.6\rebound
copying rebound\__init__.py -> build\lib.win-amd64-3.6\rebound
copying rebound\rebound.h -> build\lib.win-amd64-3.6\rebound
running build_ext
building 'librebound' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLIBREBOUND -Isrc -Ic:\users\user\appdata\local\programs\python\python36\include -Ic:\users\user\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tcsrc/rebound.c /Fobuild\temp.win-amd64-3.6\Release\src/rebound.obj -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=c7087474e5b18039d66c506088164c06e2c3659e -DLIBREBOUND -D_GNU_SOURCE -fPIC
cl : Command line error D8021 : invalid numeric argument '/Wno-unknown-pragmas'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

----------------------------------------
Failed building wheel for rebound
Running setup.py clean for rebound
Failed to build rebound
Installing collected packages: rebound
Running setup.py install for rebound ... error
Complete output from command c:\users\user\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-build-h7n58o8k\\rebound\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\User\AppData\Local\Temp\pip-zpsleveu-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\rebound
copying rebound\data.py -> build\lib.win-amd64-3.6\rebound
copying rebound\debug.py -> build\lib.win-amd64-3.6\rebound
copying rebound\horizons.py -> build\lib.win-amd64-3.6\rebound
copying rebound\interruptible_pool.py -> build\lib.win-amd64-3.6\rebound
copying rebound\particle.py -> build\lib.win-amd64-3.6\rebound
copying rebound\plotting.py -> build\lib.win-amd64-3.6\rebound
copying rebound\simulation.py -> build\lib.win-amd64-3.6\rebound
copying rebound\simulationarchive.py -> build\lib.win-amd64-3.6\rebound
copying rebound\tools.py -> build\lib.win-amd64-3.6\rebound
copying rebound\units.py -> build\lib.win-amd64-3.6\rebound
copying rebound\widget.py -> build\lib.win-amd64-3.6\rebound
copying rebound\__init__.py -> build\lib.win-amd64-3.6\rebound
copying rebound\rebound.h -> build\lib.win-amd64-3.6\rebound
running build_ext
building 'librebound' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLIBREBOUND -Isrc -Ic:\users\user\appdata\local\programs\python\python36\include -Ic:\users\user\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tcsrc/rebound.c /Fobuild\temp.win-amd64-3.6\Release\src/rebound.obj -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=c7087474e5b18039d66c506088164c06e2c3659e -DLIBREBOUND -D_GNU_SOURCE -fPIC
cl : Command line error D8021 : invalid numeric argument '/Wno-unknown-pragmas'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

----------------------------------------
Command "c:\users\user\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-build-h7n58o8k\\rebound\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\User\AppData\Local\Temp\pip-zpsleveu-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-build-h7n58o8k\rebound\

C:\Users\User>

最佳答案

在窗口 cmd/powershell 上执行以下命令并重新启动 cmd 提示符。它对我有用。

$env:VCINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
$env:CL="-FI "$env:VCINSTALLDIR\INCLUDE\stdint.h""

关于python-3.x - cl.exe 失败,退出状态为 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48775493/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com