繁体   English   中英

PyOpenCl 安装问题

[英]PyOpenCl Install Issue

我正在尝试安装 PyOpenCL 并收到此错误。 我已经尝试将 .whl 文件直接安装到站点包文件夹中并运行也不起作用的 gputools。 任何帮助将不胜感激。 完整的错误代码如下。

ERROR: Command errored out with exit status 1:
     command: 'c:\users\UserName\anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\UserName\\AppData\\Local\\Temp\\pip-install-uotqx7js\\pyopencl_da23417ff44f4dcf9ac1442acec7e11b\\setup.py'"'"'; __file__='"'"'C:\\Users\\UserName\\AppData\\Local\\Temp\\pip-install-uotqx7js\\pyopencl_da23417ff44f4dcf9ac1442acec7e11b\\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\UserName\AppData\Local\Temp\pip-record-7cpcxmrk\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\UserName\anaconda3\Include\pyopencl'
         cwd: C:\Users\UserName\AppData\Local\Temp\pip-install-uotqx7js\pyopencl_da23417ff44f4dcf9ac1442acec7e11b\
    Complete output (72 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\algorithm.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\array.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\bitonic_sort.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\bitonic_sort_templates.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\cache.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\capture_call.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\clmath.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\clrandom.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\cltypes.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\elementwise.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\invoker.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\ipython_ext.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\reduction.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\scan.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\tools.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\version.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\_cluda.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\_mymako.py -> build\lib.win-amd64-3.8\pyopencl
    copying pyopencl\__init__.py -> build\lib.win-amd64-3.8\pyopencl
    creating build\lib.win-amd64-3.8\pyopencl\characterize
    copying pyopencl\characterize\performance.py -> build\lib.win-amd64-3.8\pyopencl\characterize
    copying pyopencl\characterize\__init__.py -> build\lib.win-amd64-3.8\pyopencl\characterize
    creating build\lib.win-amd64-3.8\pyopencl\compyte
    copying pyopencl\compyte\array.py -> build\lib.win-amd64-3.8\pyopencl\compyte
    copying pyopencl\compyte\dtypes.py -> build\lib.win-amd64-3.8\pyopencl\compyte
    copying pyopencl\compyte\__init__.py -> build\lib.win-amd64-3.8\pyopencl\compyte
    creating build\lib.win-amd64-3.8\pyopencl\compyte\ndarray
    copying pyopencl\compyte\ndarray\gen_elemwise.py -> build\lib.win-amd64-3.8\pyopencl\compyte\ndarray
    copying pyopencl\compyte\ndarray\gen_reduction.py -> build\lib.win-amd64-3.8\pyopencl\compyte\ndarray
    copying pyopencl\compyte\ndarray\setup_opencl.py -> build\lib.win-amd64-3.8\pyopencl\compyte\ndarray
    copying pyopencl\compyte\ndarray\test_gpu_elemwise.py -> build\lib.win-amd64-3.8\pyopencl\compyte\ndarray
    copying pyopencl\compyte\ndarray\test_gpu_ndarray.py -> build\lib.win-amd64-3.8\pyopencl\compyte\ndarray
    copying pyopencl\compyte\ndarray\__init__.py -> build\lib.win-amd64-3.8\pyopencl\compyte\ndarray
    running egg_info
    writing pyopencl.egg-info\PKG-INFO
    writing dependency_links to pyopencl.egg-info\dependency_links.txt
    writing requirements to pyopencl.egg-info\requires.txt
    writing top-level names to pyopencl.egg-info\top_level.txt
    reading manifest file 'pyopencl.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    adding license file 'LICENSE'
    writing manifest file 'pyopencl.egg-info\SOURCES.txt'
    creating build\lib.win-amd64-3.8\pyopencl\cl
    copying pyopencl\cl\pyopencl-airy.cl -> build\lib.win-amd64-3.8\pyopencl\cl
    copying pyopencl\cl\pyopencl-bessel-j-complex.cl -> build\lib.win-amd64-3.8\pyopencl\cl
    copying pyopencl\cl\pyopencl-bessel-j.cl -> build\lib.win-amd64-3.8\pyopencl\cl
    copying pyopencl\cl\pyopencl-bessel-y.cl -> build\lib.win-amd64-3.8\pyopencl\cl
    copying pyopencl\cl\pyopencl-complex.h -> build\lib.win-amd64-3.8\pyopencl\cl
    copying pyopencl\cl\pyopencl-eval-tbl.cl -> build\lib.win-amd64-3.8\pyopencl\cl
    copying pyopencl\cl\pyopencl-hankel-complex.cl -> build\lib.win-amd64-3.8\pyopencl\cl
    copying pyopencl\cl\pyopencl-ranluxcl.cl -> build\lib.win-amd64-3.8\pyopencl\cl
    creating build\lib.win-amd64-3.8\pyopencl\cl\pyopencl-random123
    copying pyopencl\cl\pyopencl-random123\array.h -> build\lib.win-amd64-3.8\pyopencl\cl\pyopencl-random123
    copying pyopencl\cl\pyopencl-random123\openclfeatures.h -> build\lib.win-amd64-3.8\pyopencl\cl\pyopencl-random123
    copying pyopencl\cl\pyopencl-random123\philox.cl -> build\lib.win-amd64-3.8\pyopencl\cl\pyopencl-random123
    copying pyopencl\cl\pyopencl-random123\threefry.cl -> build\lib.win-amd64-3.8\pyopencl\cl\pyopencl-random123
    running build_ext
    building 'pyopencl._cl' extension
    creating build\temp.win-amd64-3.8
    creating build\temp.win-amd64-3.8\Release
    creating build\temp.win-amd64-3.8\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYGPU_PACKAGE=pyopencl -DPYGPU_PYOPENCL=1 -Ipybind11/include -Ic:\users\UserName\anaconda3\lib\site-packages\pybind11\include -Ic:\users\UserName\anaconda3\lib\site-packages\numpy\core\include -Ic:\users\UserName\anaconda3\include -Ic:\users\UserName\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpsrc/wrap_constants.cpp /Fobuild\temp.win-amd64-3.8\Release\src/wrap_constants.obj -fvisibility=hidden /EHsc /DVERSION_INFO=\"2021.2.8\"
    cl : Command line warning D9002 : ignoring unknown option '-fvisibility=hidden'
    wrap_constants.cpp
    C:\Users\UserName\AppData\Local\Temp\pip-install-uotqx7js\pyopencl_da23417ff44f4dcf9ac1442acec7e11b\src\wrap_cl.hpp(70): fatal error C1083: Cannot open include file: 'CL/cl.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\UserName\anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\UserName\\AppData\\Local\\Temp\\pip-install-uotqx7js\\pyopencl_da23417ff44f4dcf9ac1442acec7e11b\\setup.py'"'"'; __file__='"'"'C:\\Users\\UserName\\AppData\\Local\\Temp\\pip-install-uotqx7js\\pyopencl_da23417ff44f4dcf9ac1442acec7e11b\\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\UserName\AppData\Local\Temp\pip-record-7cpcxmrk\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\UserName\anaconda3\Include\pyopencl' Check the logs for full command output.

pyopencl 似乎是一个源包。 如果您愿意,该文档包含有关如何从源代码构建的一些说明。 但是,它还包括更方便的替代方案。

引用自安装说明

安装 PyOpenCL

到目前为止,安装 PyOpenCL 的最简单方法是使用Conda Forge 中可用的包。

您还可以使用Christoph Gohlke 的二元轮

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM