Ubuntu安装pycuda报错:required to install pyproject.toml-based projects

这篇具有很好参考价值的文章主要介绍了Ubuntu安装pycuda报错:required to install pyproject.toml-based projects。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

最近使用ubuntu安装pycuda时报错

subset/bpl_subset/libs/python/src/converter/arg_to_python_base.o
      <command-line>: fatal error: /usr/local/cuda/include/stdc-predef.h: 权限不够
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycuda
Failed to build pycuda
ERROR: Could not build wheels for pycuda, which is required to install pyproject.toml-based projects

一直在找最后一条的错误信息,忽略了前面那句权限不够。

cd到/usr/local/cuda目录下

使用ls命令
查看权限发现include颜色和其他的不同,是蓝绿色的,没有权限

使用sudo chmod 777 include赋权限

cd /usr/local/cuda-11.7/
ls
sudo chmod 777 include

继续pip install pycuda ,运行成功文章来源地址https://www.toymoban.com/news/detail-786734.html

pip install pycuda


Defaulting to user installation because normal site-packages is not writeable
Collecting pycuda
  Using cached pycuda-2023.1.tar.gz (1.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pytools>=2011.2 (from pycuda)
  Using cached pytools-2023.1.1-py2.py3-none-any.whl.metadata (2.7 kB)
Collecting appdirs>=1.4.0 (from pycuda)
  Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting mako (from pycuda)
  Using cached Mako-1.3.0-py3-none-any.whl.metadata (2.9 kB)
Collecting platformdirs>=2.2.0 (from pytools>=2011.2->pycuda)
  Using cached platformdirs-4.0.0-py3-none-any.whl.metadata (11 kB)
Requirement already satisfied: typing-extensions>=4.0 in ./.local/lib/python3.10/site-packages (from pytools>=2011.2->pycuda) (4.8.0)
Requirement already satisfied: MarkupSafe>=0.9.2 in ./.local/lib/python3.10/site-packages (from mako->pycuda) (2.1.3)
Using cached pytools-2023.1.1-py2.py3-none-any.whl (70 kB)
Using cached Mako-1.3.0-py3-none-any.whl (78 kB)
Using cached platformdirs-4.0.0-py3-none-any.whl (17 kB)
Building wheels for collected packages: pycuda
  Building wheel for pycuda (pyproject.toml) ... done
  Created wheel for pycuda: filename=pycuda-2023.1-cp310-cp310-linux_x86_64.whl size=661263 sha256=8d250013fb662277fe30d7e3a88dfeb9838420974e524b1ad1f504cbad360935
  Stored in directory: /home/lww/.cache/pip/wheels/46/65/06/b997165edd2fd9690c3497ca54ea4485b571d7bd959c21c6c4
Successfully built pycuda
Installing collected packages: appdirs, platformdirs, mako, pytools, pycuda
Successfully installed appdirs-1.4.4 mako-1.3.0 platformdirs-4.0.0 pycuda-2023.1 pytools-2023.1.1

到了这里,关于Ubuntu安装pycuda报错:required to install pyproject.toml-based projects的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包