【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

相关推荐
智算菩萨11 分钟前
【Pygame】第10章 游戏状态管理与场景切换机制
python·游戏·pygame
songcream115 分钟前
TensorFlow的一些基本概念
人工智能·python·tensorflow
AI逐月2 小时前
解决 ComfyUI 插件安装后 Nanobind 报错问题:soxr 版本冲突原理解读
开发语言·python
AC赳赳老秦2 小时前
Windows 系统 OpenClaw 执行策略报错及管理员权限设置深度解析与实操指南
运维·人工智能·python·django·自动化·媒体·openclaw
软件开发技术深度爱好者2 小时前
用python + pillow实现GUI界面图片GUI处理工具
开发语言·python
FreakStudio2 小时前
ESP32 实现在线动态安装库和自动依赖安装-使用uPyPI包管理平台
python·单片机·嵌入式·面向对象·电子diy·sourcetrail
别抢我的锅包肉2 小时前
【FastAPI】 响应类型详解:从默认 JSON 到自定义响应
python·fastapi
智算菩萨3 小时前
【Tkinter】15 样式与主题深度解析:ttk 主题系统、Style 对象与跨平台样式管理实战
开发语言·python·ui·ai编程·tkinter
weixin_419349793 小时前
Python 项目中生成 requirements.txt 文件
开发语言·python