python - 如何在 Windows PC 上安装 pygalmesh(取决于 Eigen)?
问题描述
编辑:对于那些感兴趣的人,创作者目前正在这里工作。
我正在尝试使用 pygalmesh 安装,这pip install pygalmesh
取决于Eigen。我已经下载了 Eigen,但 pip 安装程序并不“知道”这一点。它返回以下错误消息:
ERROR: Could not build wheels for pygalmesh which use PEP 517 and cannot be installed directly
进一步来说:
fatal error C1083: Cannot open include file: 'Eigen/Dense':
Pygalmesh 的github有一个setup.py文件,我可以对其进行编辑,但我不知道如何安装pygalmesh。还在用pip吗?
是否有我可以编辑的 setup.py 文件,以便安装程序知道 Eigen/Dense 的位置?由于我有一台 Windows PC,我至少认为/
需要更改为\
. 但我找不到要编辑的 setup.py。
我在网上其他地方找到了关于这个问题的对话,也在这里。我不知道如何实现这些帖子中讨论的内容。我也尝试过通过 conda 安装 eigen,就像这里一样。这也没有奏效。
完整的错误信息:
Collecting pygalmesh
Using cached pygalmesh-0.6.2.tar.gz (1.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Collecting pybind11>=2.2
Using cached pybind11-2.5.0.tar.gz (139 kB)
Collecting meshio<5.0.0,>=4.0.0
Downloading meshio-4.0.11.tar.gz (302 kB)
|████████████████████████████████| 302 kB 2.2 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: importlib-metadata in c:\users\user\anaconda3\lib\site-packages (from pygalmesh) (1.5.0)
Requirement already satisfied: numpy in c:\users\user\anaconda3\lib\site-packages (from pygalmesh) (1.16.2)
Requirement already satisfied: zipp>=0.5 in c:\users\user\anaconda3\lib\site-packages (from importlib-metadata->pygalmesh) (2.2.0)
Skipping wheel build for pybind11, due to binaries being disabled for it.
Building wheels for collected packages: pygalmesh, meshio
Building wheel for pygalmesh (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\User\Anaconda3\python.exe' 'C:\Users\User\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmpa0eqknmo'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-qm6jy0mx\pygalmesh
Complete output (24 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pygalmesh
copying pygalmesh\main.py -> build\lib.win-amd64-3.7\pygalmesh
copying pygalmesh\__about__.py -> build\lib.win-amd64-3.7\pygalmesh
copying pygalmesh\__init__.py -> build\lib.win-amd64-3.7\pygalmesh
creating build\lib.win-amd64-3.7\pygalmesh\_cli
copying pygalmesh\_cli\helpers.py -> build\lib.win-amd64-3.7\pygalmesh\_cli
copying pygalmesh\_cli\_inr.py -> build\lib.win-amd64-3.7\pygalmesh\_cli
copying pygalmesh\_cli\_remesh_surface.py -> build\lib.win-amd64-3.7\pygalmesh\_cli
copying pygalmesh\_cli\_volume_from_surface.py -> build\lib.win-amd64-3.7\pygalmesh\_cli
copying pygalmesh\_cli\__init__.py -> build\lib.win-amd64-3.7\pygalmesh\_cli
running build_ext
building '_pygalmesh' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/eigen3/ -IC:\Users\User\AppData\Local\Temp\pip-build-env-bi2kt8ry\normal\Lib\site-packages\pybind11\include -IC:\Users\User\AppData\Local\Temp\pip-build-env-bi2kt8ry\normal\Lib\site-packages\pybind11\include -IC:\Users\User\Anaconda3\include -IC:\Users\User\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc/generate.cpp /Fobuild\temp.win-amd64-3.7\Release\src/generate.obj
generate.cpp
C:\Users\User\AppData\Local\Temp\pip-install-qm6jy0mx\pygalmesh\src\domain.hpp(4): fatal error C1083: Cannot open include file: 'Eigen/Dense': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for pygalmesh
Building wheel for meshio (PEP 517) ... done
Created wheel for meshio: filename=meshio-4.0.11-py3-none-any.whl size=127526 sha256=cc63c5792c3d20bce3532742afcccc100bc6312c1254e029f8771f286a5979c2
Stored in directory: c:\users\user\appdata\local\pip\cache\wheels\17\27\cf\b034bc0b8bffd85475dfbab9791fcdeea89c77f040c4537afe
Successfully built meshio
Failed to build pygalmesh
ERROR: Could not build wheels for pygalmesh which use PEP 517 and cannot be installed directly
解决方案
推荐阅读
- java - 使用 @Schedule 部署到 JBoss 时出现 NullPointerException
- javascript - 大图像 HTML5 Canvas 在规模上表现不佳
- django - Django rest框架 - 创建并返回一个对象的多个实例而不是一个
- ansible - 将变量合并/连接在一起
- swift - 使用未知变量解析 Json
- .htaccess - htaccess 时间条件规则无法正常工作
- r - 如何使用 otpim 估计求职模型的结构参数
- excel - Excel 筛选器,多个条件,一列,两个条件都为真
- php - CakePHP - 蛋糕烘烤所有错误(说在 database.php 中缺少 $default,但它存在)
- spring - 春季分页HttpMessageNotWritableException HTTP状态500