问题:pip install pycuda安装pycuda 报错如下
src/cpp/cuda.hpp:14:18: fatal error: cuda.h: No such file or directory
#include <cuda.h>^
error: command '/usr/bin/gcc' failed with exit code 1
解决1:
pip install cuda-python==12.1.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
解决2:
export PATH=/usr/local/cuda-11.7/bin:/usr/local/cuda/bin:$PATH // 即 cuda 的路径这里在root 模式下再包含一遍即可
pip install pycuda -i https://pypi.tuna.tsinghua.edu.cn/simple