- conda -V:查看anaconda版本
- conda info --envs :查看下属环境
- conda activate tensorflow:激活环境
- 查看TensorFlow版本:python import tensorflow as tf print(tf.__version__)
- 查看当前环境下的包:pip list;conda list
- 查看当前channel:conda config --show channels
- 添加清华源:
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
卸载tensorflow:
pip uninstall tensorflow-gpu==1.13.1
conda安装cpu版本tensorflow:
conda install --channel https://conda.anaconda.org/anaconda tensorflow=1.6.0
重新安装服务器环境
- 先联网(适用于实验室不能联网的情况),python nxx.py,输入用户名和密码,联网成功后,新建一个ssh
- conda create --name yourEnv python=3.7 创建新环境
- 进入新环境 conda activate wsq
- pip install tensorflow-gpu
- 或者 conda install tensorflow==1.13.1