1.之前已经安装了anaconda,之前疏忽使用的pip安装的tensorflow,但pycharm还是使用的anaconda环境。

现在把pip的tensorflow删除了

pip uninstall tensorflow-gpu

 

2.之前的环境变量有的在root用户下配置,有的在非root用户下

于是把root用户下~/.bashrc中的export内容复制到非root用户下~/.bashrc中

 

3.重新在conda中安装tensorflow

conda install tensorflow-gpu

出现

ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/

 

4.输入unset all_proxy && unset ALL_PROXY后可以成功开始下载

使用conda安装tensorflow-gpu

 

5.出现一些组件下载失败的情况

使用conda安装tensorflow-gpu

尝试重新下载

conda install tensorflow-gpu

 

6.多次尝试后完成下载,但出现另一个问题

使用conda安装tensorflow-gpu

 

7.进入root用户重新输入命令,完成

使用conda安装tensorflow-gpu

相关文章: