在ubuntu16.04系统下安装配置tensorflow以后,每次开启都显示错误,需要设置变量,以下是解决办法:
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