【环境安装】please confirm that the path of cuda is set to the env LD

【环境安装】please confirm that the path of cuda is set to the env LD,第1张

环境安装】please confirm that the path of cuda is set to the env LD 问题描述

在按照官方教程安装完成以后,执行 python -c "import mindspore", 报一下错:

[WARNING] ME(9662:140307555661632,MainProcess):2021-10-28-20:46:21.685.307 [mindspore/run_check/_check_version.py:181] Cuda [‘10.1’, ‘11.1’] version(need by mindspore-gpu) is not found, please confirm that the path of cuda is set to the env LD_LIBRARY_PATH, please refer to the installation guidelines: https://www.mindspore.cn/install

解决方案

首先确定需要安装cuda10.1或者11.1,然后修改用户主目录下的 .bashrc文件:

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH="/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/home/xx/anaconda3/envs/py37/lib:$LD_LIBRARY_PATH"

其中最关键的是最后一行,将你构建环境的lib添加在LD_LIBRARY_PATH环境变量中。

修改完成以后别忘了source一下生效:

source ~/.bashrc

然后重新启动环境测试:

source activate py37
python -c "import mindspore"

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/4827849.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-10
下一篇2022-11-10

发表评论

登录后才能评论

评论列表(0条)

    保存