一、下載anaconda:
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
本人下載的是:
anaconda3:python版本是3系列,4.2.0默認的python是3.5;
二、安裝anaconda
- 安裝:bash Anaconda3-4.2.0-Linux-x86_64.sh
- 添加第三方源:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
-
查看是否將anaconda路徑加入到環境變量中:
vim ~/.bashrc
source ~/.bashrc
- 解決無法創建虛環境問題:
打開 ~/.condarc 文件,並刪除 - defaults 一行:
sudo gedit ~/.condarc
詳情參考:https://blog.csdn.net/weixin_39555761/article/details/80918320
三、安裝tensorflow
conda install tensorflow-gpu=1.9 cudatoolkit=9.0 cudnn=7.1