执行:pip install pycuda

出现:Building wheel for pycuda (PEP 517) ... error

Building wheels for collected packages: pycuda, pytoolsBuilding wheel for pycuda (PEP 517) ... errorERROR: Command errored out with exit status 1:command: /usr/bin/python3.8 /usr/local/lib/python3.8/dist-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp8diqrj_ccwd: /tmp/pip-install-xt280urn/pycuda_5d4c81cb559b4a6fa572a62bf9757598Complete output (101 lines):**************************************************************** I have detected that you have not run configure.py.**************************************************************** Additionally, no global config files were found.*** I will go ahead with the default configuration.*** In all likelihood, this will not work out.****** See README_SETUP.txt for more information.****** If the build does fail, just re-run configure.py with the*** correct arguments, and then retry. Good luck!**************************************************************** HIT Ctrl-C NOW IF THIS IS NOT WHAT YOU WANT*************************************************************Continuing in 1 seconds...    running bdist_wheelrunning buildrunning build_pycreating buildcreating build/lib.linux-x86_64-3.8creating build/lib.linux-x86_64-3.8/pycudacopying pycuda/cumath.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/compiler.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/_cluda.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/elementwise.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/characterize.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/tools.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/debug.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/autoinit.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/autoprimaryctx.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/scan.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/reduction.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/_mymako.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/driver.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/curandom.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/__init__.py -> build/lib.linux-x86_64-3.8/pycudacopying pycuda/gpuarray.py -> build/lib.linux-x86_64-3.8/pycudacreating build/lib.linux-x86_64-3.8/pycuda/glcopying pycuda/gl/autoinit.py -> build/lib.linux-x86_64-3.8/pycuda/glcopying pycuda/gl/__init__.py -> build/lib.linux-x86_64-3.8/pycuda/glcreating build/lib.linux-x86_64-3.8/pycuda/sparsecopying pycuda/sparse/packeted.py -> build/lib.linux-x86_64-3.8/pycuda/sparsecopying pycuda/sparse/operator.py -> build/lib.linux-x86_64-3.8/pycuda/sparsecopying pycuda/sparse/coordinate.py -> build/lib.linux-x86_64-3.8/pycuda/sparsecopying pycuda/sparse/cg.py -> build/lib.linux-x86_64-3.8/pycuda/sparsecopying pycuda/sparse/pkt_build.py -> build/lib.linux-x86_64-3.8/pycuda/sparsecopying pycuda/sparse/inner.py -> build/lib.linux-x86_64-3.8/pycuda/sparsecopying pycuda/sparse/__init__.py -> build/lib.linux-x86_64-3.8/pycuda/sparsecreating build/lib.linux-x86_64-3.8/pycuda/compytecopying pycuda/compyte/array.py -> build/lib.linux-x86_64-3.8/pycuda/compytecopying pycuda/compyte/dtypes.py -> build/lib.linux-x86_64-3.8/pycuda/compytecopying pycuda/compyte/__init__.py -> build/lib.linux-x86_64-3.8/pycuda/compyterunning egg_info/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'test_requires'warnings.warn(msg)warning: no files found matching 'doc/source/*.rst'warning: no files found matching 'doc/source/conf.py'warning: no files found matching 'doc/source/_static/*.css'warning: no files found matching 'doc/source/_templates/*.html'warning: no files found matching '*.cpp' under directory 'bpl-subset/bpl_subset/boost'warning: no files found matching '*.html' under directory 'bpl-subset/bpl_subset/boost'warning: no files found matching '*.inl' under directory 'bpl-subset/bpl_subset/boost'warning: no files found matching '*.txt' under directory 'bpl-subset/bpl_subset/boost'warning: no files found matching '*.h' under directory 'bpl-subset/bpl_subset/libs'warning: no files found matching '*.ipp' under directory 'bpl-subset/bpl_subset/libs'warning: no files found matching '*.pl' under directory 'bpl-subset/bpl_subset/libs'writing manifest file 'pycuda.egg-info/SOURCES.txt'creating build/lib.linux-x86_64-3.8/pycuda/cudacopying pycuda/cuda/pycuda-complex-impl.hpp -> build/lib.linux-x86_64-3.8/pycuda/cudacopying pycuda/cuda/pycuda-complex.hpp -> build/lib.linux-x86_64-3.8/pycuda/cudacopying pycuda/cuda/pycuda-helpers.hpp -> build/lib.linux-x86_64-3.8/pycuda/cudacopying pycuda/sparse/pkt_build_cython.pyx -> build/lib.linux-x86_64-3.8/pycuda/sparserunning build_extcreating build/temp.linux-x86_64-3.8creating build/temp.linux-x86_64-3.8/bpl-subsetcreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subsetcreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libscreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/pythoncreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/python/srccreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/python/src/convertercreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/python/src/objectcreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/smart_ptrcreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/smart_ptr/srccreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/systemcreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/system/srccreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/threadcreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/thread/srccreating build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/thread/src/pthreadcreating build/temp.linux-x86_64-3.8/srccreating build/temp.linux-x86_64-3.8/src/cppcreating build/temp.linux-x86_64-3.8/src/wrapperx86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -fwrapv -Wall -O3 -DNDEBUG -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_PYTHON_SOURCE=1 -Dboost=pycudaboost -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PACKAGE=pycuda -DPYGPU_PYCUDA=1 -DHAVE_CURAND=1 -Isrc/cpp -Ibpl-subset/bpl_subset -I/usr/local/cuda/include -I/usr/local/lib/python3.8/dist-packages/numpy/core/include -I/usr/include/python3.8 -c bpl-subset/bpl_subset/libs/python/src/converter/arg_to_python_base.cpp -o build/temp.linux-x86_64-3.8/bpl-subset/bpl_subset/libs/python/src/converter/arg_to_python_base.oIn file included from bpl-subset/bpl_subset/boost/python/detail/prefix.hpp:13:0,from bpl-subset/bpl_subset/boost/python/handle.hpp:8,from bpl-subset/bpl_subset/boost/python/converter/arg_to_python_base.hpp:7,from bpl-subset/bpl_subset/libs/python/src/converter/arg_to_python_base.cpp:6:bpl-subset/bpl_subset/boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory# include <pyconfig.h>^~~~~~~~~~~~compilation terminated.error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1----------------------------------------ERROR: Failed building wheel for pycudaBuilding wheel for pytools (setup.py) ... doneCreated wheel for pytools: filename=pytools-2022.1.12-py2.py3-none-any.whl size=65018 sha256=2f79761cd040baf74f025c6e24389b80090418b274cfa64973308c7e1f2748f1Stored in directory: /tmp/pip-ephem-wheel-cache-5i9u00g4/wheels/d6/c4/2a/41a750b89bfe174e3f6ee7c874e2c8595b94d2f924dcf53755
Successfully built pytools
Failed to build pycuda
ERROR: Could not build wheels for pycuda which use PEP 517 and cannot be installed directly

使用:pip install pycuda --no-binary :all:

不解决问题。

从源码编译,解决问题。

1、下载 pycuda-2021.1.tar.gz

2、tar xfz pycuda-2021.1.tar.gz

3、cd pycuda-2021.1

4、python3 configure.py --cuda-root=/usr/local/cuda

5、make install

如果有找不到 pyconfig.h 的错误,就安装 python3-dev。

如果有找不到 nvcc 的错误,就 export CUDA_ROOT=/usr/local/cuda/bin。

2022-11-04:

在 安装了 python3-dev 后,直接 pip install pycuda 也会成功。

参考:

Installing PyCUDA on Linux - Andreas Klöckner's Former Wiki

pycuda -- 'CUDA_ROOT not set, and nvcc not in path.' - Stack Overflow

安装 pycuda 出现 PEP517 的错误相关推荐

  1. 安装pycuda及问题解决

    1, 安装 pycuda a, pip3 install pycuda==版本 b, 根据这个 链接 https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycud ...

  2. jetson系列安装pycuda

    使用python进行并行计算编程时必须安装pycuda,在TX2使用命令"pip install pycuda"安装pycuda时一直安装失败,错误如下: 于是将pycuda下载下 ...

  3. Ubuntu 13.10 安装软件失败后出现的问题——已安装 post-installation 脚本 返回了错误号 1...

    安装Oracle-java7-installer失败后,再次重新安装后出现错误-- dpkg: error processing oracle-java7-installer (--configure ...

  4. 【错误归纳】E: Sub-process /usr/bin/dpkg returned an error code (1)子进程 已安装 post-installation 脚本 返回了错误号 1

    问题描述 我在使用apt-get install 安装某个程序的时候出现了下面的错误提示: 正在设置 anydesk (5.1.1) ...System start/stop links for /e ...

  5. 阿里云云服务器ECS上的Ubuntu16.04桌面安装及root账户登录错误处理

    阿里云云服务器ECS上的Ubuntu16.04桌面安装及root账户登录错误处理 2018-06-28 16:42:45 程百球 阅读数 2793更多 分类专栏: 程序配置 版权声明:本文为博主原创文 ...

  6. 编译安装samba4.89遇到的错误

    记 编译安装samba4.89 遇到的错误 公司有台samba服务器因版本过低被安全扫描出漏洞,在升级中遇到以下错误 提示权限错误, mount error(13): Permission denie ...

  7. Ubuntu下安装DEB包时出现错误的解救方法

    在Ubuntu下安装flashplayer的浏览器插件,采用dpkg -i的方法来安装,可能是因为文件依赖有问题,没有安装成功.出现如下错误: E: The package adobe-flashpl ...

  8. Win8.1无法安装更新,提示0x800*****错误的解决方法

    Win8.1无法安装更新,提示0x800*****错误的解决方法 参考文章: (1)Win8.1无法安装更新,提示0x800*****错误的解决方法 (2)https://www.cnblogs.co ...

  9. 使用虚拟机安装Linux系统常见的错误以及解决方案

    使用虚拟机安装Linux系统常见的错误以及解决方案 参考文章: (1)使用虚拟机安装Linux系统常见的错误以及解决方案 (2)https://www.cnblogs.com/yanjiexiansh ...

最新文章

  1. Singleton设计模式
  2. 在线人员统计系统php,PHP统计当前在线人数 - 案例源码
  3. DayDayUp:教你一招如何在道客巴巴免费下载自己被侵权的文章
  4. MicroBlaze程序融合fpga的bit并烧写入Flash方法
  5. java ListMapString,Object遍历的方法
  6. Hanlp自然语言处理工具的使用演练
  7. 【Animation】 使用handler和Runnable实现某一个控件的抖动效果
  8. 嘉楠勘智 K210 RISC-V 64位双核处理器开发板(荔枝丹)
  9. 从没有C到ANSI C的认识
  10. Silverlight DataGrid 在显示数据, 如果遇到全角的符号, 好像会出错. 待测试.
  11. oracle插入百万测试,Oracle中插入大量测试数据
  12. 【深入浅出图像算法】图像处理算法入门好文
  13. python正则表达式匹配数字或者逗号_将数字与正则表达式相匹配-只有数字和逗号...
  14. git 设置单个文件上传大小
  15. 通达信【波段底部机会】副图指标公式 操盘行情线 重心买入 源码
  16. 【JZOJ A组】拯救奶牛
  17. 动态控制水晶报表中数字栏位的值显示的小数位数
  18. win7浏览器主页修改不过来_IE浏览器主页无法修改的两种解决办法
  19. caj格式转换成pdf免费的有吗
  20. postman数据保存在哪里_Postman教程——使用数据文件

热门文章

  1. C++中构造函数的超详细讲解
  2. 【Windows 10 驱动程序 已解决】重装 Win 10 系统后 电脑无法识别外接屏幕。投影:你的电脑不能投影到其他屏幕。请尝试重新安装驱动程序或使用其他视频卡。
  3. Photoshop CC 2019安装过程中遇到计算机中丢失:D3DCOMPILER-47.dll的情况
  4. 我是如何通过华为面试的?群面+技术面+综合面+英语面(Android岗)
  5. 临河三中宏志班2021年高考成绩查询,临河三中名教师简介一
  6. 虚拟机配置静态IP时,ens33不显示ip解决方法
  7. 视频服务器托管如何选择数据中心
  8. 奇葩面试大赏:四年没见的前女友成了我的面试官
  9. yoyo跑_全力冲刺 目标YOYO(图)
  10. Win11无线适配器或访问点有问题怎么解决?