pyamgx
pyamgx copied to clipboard
Installation on Windows
I run into the installation problem on Windows 10. I have successfully build AMGX, and set AMG_DIR by
setx AMGX_DIR "E:\Dev\AMGX"
When I run pip install .
, I got this error:
base) PS D:\Dev2\pyamgx> pip install .
Processing d:\dev2\pyamgx
DEPRECATION: A future pip version will change local packages to be blt in-place without first copying to a temporary directory. We recomme you use --use-feature=in-tree-build to test your packages with this n behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find dcussion regarding this at https://github.com/pypa/pip/issues/7555.
Building wheels for collected packages: pyamgx
Building wheel for pyamgx (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'E:\App\miniconda3\python.exe' -u -c 'import io, os, sys, tuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\cl\\AppData\\Local\\mp\\pip-req-build-znjcxsyj\\setup.py'"'"'; __file__='"'"'C:\\Users\\clAppData\\Local\\Temp\\pip-req-build-znjcxsyj\\setup.py'"'"';f = getatttokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) se io.StringIO('"'"'from setuptools import setup; setup()'"'"');code =.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(ce, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\cl\AppData\Loc\Temp\pip-wheel-fi1dfo3v'
cwd: C:\Users\cl\AppData\Local\Temp\pip-req-build-znjcxsyj\
Complete output (12 lines):
C:\Users\cl\AppData\Local\Temp\pip-req-build-znjcxsyj\setup.py:52: UrWarning: Running commands other than `python setup.py install` on Winws will not package AMGX library, which may lead to ImportError.
Try adding directory to amgxsh.dll (which is "E:\Dev\AMGX\build\exames\Release") into PATH to avoid this.
warnings.warn(
running bdist_wheel
running build
running build_ext
building 'pyamgx' extension
"E:\App\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.329\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Uss\cl\AppData\Roaming\Python\Python39\site-packages\numpy\core\include E:\Dev\AMGX\include -IE:\App\miniconda3\include -IE:\App\miniconda3\Inude "-IE:\App\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14..31629\include" "-IE:\App\Microsoft Visual Studio\2022\Community\VC\Tos\MSVC\14.33.31629\ATLMFC\include" "-IE:\App\Microsoft Visual Studio\22\Community\VC\Auxiliary\VS\include" /Tcpyamgx/pyamgx.c /Fobuild\temp.n-amd64-3.9\Release\pyamgx/pyamgx.obj -fopenmp
cl: 命令行 warning D9002 :忽略未知选项“-fopenmp”
pyamgx.c
E:\App\miniconda3\include\pyconfig.h(59): fatal error C1083: 无法打开
包括文件: “io.h”: No such file or directory
error: command 'E:\\App\\Microsoft Visual Studio\\2022\\Community\\V\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\cl.exe' failed with exitode 2
----------------------------------------
ERROR: Failed building wheel for pyamgx
Running setup.py clean for pyamgx
Failed to build pyamgx
Installing collected packages: pyamgx
Attempting uninstall: pyamgx
Found existing installation: pyamgx 0.1
Uninstalling pyamgx-0.1:
Successfully uninstalled pyamgx-0.1
Running setup.py install for pyamgx ... error
ERROR: Command errored out with exit status 1:
command: 'E:\App\miniconda3\python.exe' -u -c 'import io, os, sys
setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\cl\\AppData\\LocalTemp\\pip-req-build-znjcxsyj\\setup.py'"'"'; __file__='"'"'C:\\Users\\\\AppData\\Local\\Temp\\pip-req-build-znjcxsyj\\setup.py'"'"';f = getar(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__
else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compileode, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\cl\AppDataocal\Temp\pip-record-f34zpbzo\install-record.txt' --single-version-extnally-managed --compile --install-headers 'E:\App\miniconda3\Include\pmgx'
cwd: C:\Users\cl\AppData\Local\Temp\pip-req-build-znjcxsyj\
Complete output (15 lines):
E:\App\miniconda3\lib\site-packages\setuptools\command\install.py:: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use bud and pip and other standards-based tools.
warnings.warn(
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\pyamgx
"E:\App\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -\include -IE:\Dev\AMGX\include -IE:\App\miniconda3\include -IE:\App\miniconda3\Include "-IE:\App\Microsoft Visual Studio\2022\Community\VC3\Tools\MSVC\14.33.31629\include" "-IE:\App\Microsoft Visual Studio\20C22\Community\VC\Tools\MSVC\14.33.31629\ATLMFC\include" "-IE:\App\Micrnosoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" /Tcpyamgxcnmp l
cl: 命令行 warning D9002 :忽略未知选项“-fopenmp” m
pyamgx.c V
E:\App\miniconda3\include\pyconfig.h(59): fatal error C1083: 无法.
打开包括文件: “io.h”: No such file or directory
\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
Rolling back uninstall of pyamgx
Moving to e:\app\miniconda3\lib\site-packages\pyamgx-0.1.dist-info\\
Moving to e:\app\miniconda3\lib\site-packages\pyamgx.cp39-win_amd64.pyd
from C:\Users\cl\AppData\Local\Temp\pip-uninstall-x85mvxtb\pyamgx.cp39-win_amd64.pyd
ERROR: Command errored out with exit status 1: 'E:\App\miniconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\cl\\AppData\\Local\\Temp\\pip-req-build-znjcxsyj\\setup.py'"'"'; __file__='"'"'C:\\Users\\cl\\AppData\\Local\\Temp\\pip-req-build-znjcxsyj\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\cl\AppData\Local\Temp\pip-record-f34zpbzo\install-record.txt' --single-version-externally-managed --compile --install-headers 'E:\App\miniconda3\Include\pyamgx' Check the logs for full command output.