【CuPy报错】NVRTC_ERROR_COMPILATION (6)找不到 ‘vector_types.h‘

cupy安装不要再使用pip install cupy了,

已经替换成基于版本安装了pip install cupy-cuda12x,详见cupy官网。

安装完成后,在import cupy之后报错,找不到 'vector_types.h':

复制代码
CompileException: /home/zoe/venv/lib/python3.10/site-packages/cupy/_core/include/cupy/_cuda/cuda-12.4/cuda_fp16.h(129): catastrophic error: cannot open source file "vector_types.h"
  #include "vector_types.h"
                           ^

1 catastrophic error detected in the compilation of "/tmp/tmpj2ipaghf/e51b12159fb86782de36519c3d354c9de068af57.cubin.cu".
Compilation terminated.

你还需要安装一个CUDA的头文件,其中12.6可以替换成你用的cupy版本。

复制代码
pip install "nvidia-cuda-runtime-cu12==12.6.*"

参考:

1\]: https://github.com/cupy/cupy/issues/8466 \[2\]: https://docs.cupy.dev/en/latest/install.html#cupy-always-raises-nvrtc-error-compilation-6

相关推荐
SCBAiotAigc1 分钟前
langchain1.2学习笔记(一):安装langchain
人工智能·python·langchain
亓才孓9 分钟前
java中的Math.Radom拓展
开发语言·python·算法
yongche_shi39 分钟前
第八十八篇: 设计一个配置中心
python·面试宝典·设计一个配置中心
itwangyang5201 小时前
AIDD药物筛选与设计详细方法
人工智能·python
NiceAsiv1 小时前
VSCode之打开python终端 取消conda activate的powershell弹窗
vscode·python·conda
蔚说1 小时前
is 与 == 的区别 python
python
cnxy1881 小时前
围棋对弈Python程序开发完整指南:步骤3 - 气(Liberties)的计算算法设计
python·算法·深度优先
叶子2024222 小时前
骨架点排序计算
python
AC赳赳老秦2 小时前
行业数据 benchmark 对比:DeepSeek上传数据生成竞品差距分析报告
开发语言·网络·人工智能·python·matplotlib·涛思数据·deepseek
小鸡吃米…2 小时前
带Python的人工智能——深度学习
人工智能·python·深度学习