Anaconda中在自己的conda环境中安装TensorFlow
1、前提
在此前的博客中已经安装了conda的虚拟环境“pytorch“(这是虚拟环境的名字),不是pytorch框架,其他虚拟环境也行,这里就不叙述了。
2、激活这个虚拟环境
activate pytorch
3、用pip安装tensorflow
pip install tensorflow
我这里因为没有改镜像源,所以下载的很慢。
命令行添加清华镜像源,换上再安装就快了
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
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/r/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
4、检验安装
import tensorflow as tf
tf.version
tf.path
安装完成!!!