ubuntu16.04安装配置tensorflow以后,每次开启都显示错误,需要设置变量

时间:2022-10-28 09:19:35

1.打开终端并输入:

    sudo gedit ~/.bashrc

2.在打开的文件末尾添加如下代码:

    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"

 export CUDA_HOME=/usr/local/cuda
3.保存以后,在终端运行如下代码:
source ~/.bashrc