首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PyOpenCl安装问题

PyOpenCl安装问题
EN

Stack Overflow用户
提问于 2021-10-14 06:39:25
回答 1查看 39关注 0票数 0

我正在尝试安装PyOpenCL,但是得到了这个错误。我已经尝试将.whl文件直接安装到站点包文件夹中,并运行gputools,但也没有成功。任何帮助都将不胜感激。下面是完整的错误代码。

代码语言:javascript
复制
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.
EN

回答 1

Stack Overflow用户

发布于 2021-10-14 07:03:40

pyopencl似乎是一个源码包。documentation包含了一些关于如何根据源代码进行构建的说明。但是,它还包括更方便的替代方案。

引用自installation instructions

安装PyOpenCL

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

您也可以使用Christoph Gohlke’s binary wheels

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69566100

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档