我在试着安装pysph。我尝试了MSVC 2017和MSVC 2022。当我尝试执行pip install时,最后会出现以下错误。
building 'pysph.base.octree' extension
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD "-IC:\Users\Matthew Scholar\AppData\Local\Temp\pip-build-env-8kmg9l2e\overlay\Lib\site-packages\numpy\core\include" "-Ic:\users\matthew scholar\appdata\local\programs\python\python38\include" "-Ic:\users\matthew scholar\appdata\local\programs\python\python38\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tppysph/base/octree.cpp /Fobuild\temp.win-amd64-cpython-38\Release\pysph/base/octree.obj /openmp
octree.cpp
c:\users\matthew scholar\appdata\local\temp\pip-build-env-8kmg9l2e\overlay\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pysph/base/octree.cpp(9616): error C3861: '_Pragma': identifier not found
pysph/base/octree.cpp(9616): error C2059: syntax error: ';'
pysph/base/octree.cpp(9634): error C3861: '_Pragma': identifier not found
pysph/base/octree.cpp(9634): error C2059: syntax error: ';'
pysph/base/octree.cpp(9769): error C3861: '_Pragma': identifier not found
pysph/base/octree.cpp(9769): error C2059: syntax error: ';'
pysph/base/octree.cpp(9787): error C3861: '_Pragma': identifier not found
pysph/base/octree.cpp(9787): error C2059: syntax error: ';'
pysph/base/octree.cpp(9927): error C2065: '__pyx_parallel_exc_type': undeclared identifier
pysph/base/octree.cpp(9929): error C2065: '__pyx_parallel_exc_type': undeclared identifier
pysph/base/octree.cpp(9930): error C2065: '__pyx_parallel_exc_type': undeclared identifier
pysph/base/octree.cpp(9930): error C2065: '__pyx_parallel_exc_value': undeclared identifier
pysph/base/octree.cpp(9930): error C2065: '__pyx_parallel_exc_tb': undeclared identifier
pysph/base/octree.cpp(9931): error C2065: '__pyx_parallel_filename': undeclared identifier
pysph/base/octree.cpp(15447): error C3010: '__pyx_L12_error': jump out of OpenMP structured block not allowed
C:\Users\Matthew Scholar\AppData\Local\Temp\pip-build-env-8kmg9l2e\overlay\Lib\site-packages\setuptools\command\build_py.py:202: SetuptoolsDeprecationWarning: Installing 'pysph.base' as data is deprecated, please list it in `packages`.
check.warn(importable)
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for pysph编辑:通过使用MSVC 2019和python 3.8修复(安装了早期版本的vtk用于mayavi)
发布于 2022-10-14 15:42:55
我从未使用过PySPH,但以下是一些我想排除的东西:
pip install PySPH
这是取自https://pypi.org/project/PySPH/的
尝试从https://github.com/pypr/pysph安装
git clone https://bitbucket.org/pysph/pysph.git
请确保文档中有相关的依赖项,有一个专门用于安装https://pysph.readthedocs.io/en/1.0a1/installation.html#installing-the-dependencies-on-windows的 C++编译器部分。
您可以通过命令提示符检查是否安装了依赖项。
<name of dependency> --version安装git克隆。
https://stackoverflow.com/questions/74060506
复制相似问题