安装

下载sh,用普通用户权限执行安装,会自动~/.source里添加Anaconda变量

换源

1
2
3
4
5
6
7
8
vim ~/.condarc
#输入
channels:
- https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults
show_channel_urls: true

新建虚拟环境

1
2
3
4
5
6
7
8
9
conda create -n tf python=3.5

# To activate this environment, use
#
# $ conda activate tf
#
# To deactivate an active environment, use
#
# $ conda deactivate

升级pip、安装tf

1
2
3
conda activate tf
pip install --upgrade pip
pip install tensorflow-gpu