配置环境变量
用户 jiangshan为例
(base) [jiangshan@localhost ~]$ export PATH=$PATH:/usr/local/MATLAB/R2014a/bin/
(base) [jiangshan@localhost ~]$ export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH
(base) [jiangshan@localhost ~]$ source /etc/profile
(base) [jiangshan@localhost ~]$ echo $PATH
/home/jiangshan/anaconda3/bin:/home/jiangshan/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/jiangshan/pycharm/pycharm-community-anaconda-2019.1.3/bin:/home/jiangshan/.local/bin:/home/jiangshan/bin:/usr/local/MATLAB/R2014a/bin/:/home/jiangshan/pycharm/pycharm-community-anaconda-2019.1.3/bin
(base) [jiangshan@localhost ~]$ echo $LD_LIBRARY_PATH
或 配置环境变量
[root@localhost software-tool]# gedit ~/.bashrc
Please make sure that
- PATH includes /usr/local/cuda-10.1/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-10.1/lib64
添加如下:
#gpu driver
export CUDA_HOME=/usr/local/cuda-10.1
export PATH=/usr/local/cuda-10.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH
[root@localhost software-tool]# source ~/.bashrc
转载于:https://www.cnblogs.com/jeshy/p/11507049.html