Bootstrap

【Linux】ubuntu18 | cuda10.1安装cupy报错

Ubuntu18中安装cupy报错

环境介绍

ubuntu18
python3.6
cuda10.1(安装的多版本cuda,软连接为cuda10.1版本)
在conda中新建环境后安装cupy

具体问题

跑程序的时候需要用到cupy库用于加速numpy运算。
在官网上找到安装命令,个人比较习惯使用pip安装,本机的cuda版本是10.1,所以就使用pip install cupy-cuda101命令进行安装,成功安装后没有报错。
在这里插入图片描述
但是在后面的使用中报错: ImportError: CuPy is not correctly installed
在这里插入图片描述

解决方案

pip uninstall 卸载之前安装的cupy,改用conda安装:conda install -c conda-forge cupy cudatoolkit=10.1

;