windows10+Python3.6+Anaconda3+tensorflow1.10.0
# Anaconda3安装自行下载安装,之后dos或Anaconda Prompt终端查看Anaconda3版本
(base) C:\Users\jiangshan>conda -V
conda 4.6.8
windows10下使用Anaconda3安装tensorflow1.10.0
# TenssorFlow目前还不支持Python 3.7,使用Anaconda3创建Python 3.6虚拟环境
# 创建基于python 3.6 的tensorflow环境:
(base) C:\Users\jiangshan>conda create --name tensorflow python=3.6
留意以下信息
==========================================
environment location: S:\Users\jiangshan\Anaconda3\envs\tensorflow
added / updated specs:
- python=3.6
The following packages will be downloaded:
package | build
---------------------------|-----------------
certifi-2019.3.9 | py36_0 149 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
pip-19.0.3 | py36_0 1.9 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
python-3.6.7 | he025d50_1004 20.7 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
setuptools-40.8.0 | py36_0 633 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
wheel-0.33.1 | py36_0 52 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
wincertstore-0.2 | py36_1002 13 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
==========================================
# 进入虚拟环境 tensorflow
(base) C:\Users\jiangshan>conda activate tensorflow
# 安装 tensorflow
(base) C:\Users\jiangshan>conda install tensorflow
==============================================================================================================
environment location: S:\Users\jiangshan\Anaconda3\envs\tensorflow
added / updated specs:
- tensorflow
The following packages will be downloaded:
package | build
---------------------------|-----------------
absl-py-0.7.0 | py36_1000 154 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
astor-0.7.1 | py_0 22 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
gast-0.2.2 | py_0 10 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
grpcio-1.16.0 |py36hbb4b082_1000 861 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libprotobuf-3.7.0 | h1a1b453_1 2.2 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
m2w64-gcc-libgfortran-5.3.0| 6 340 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
m2w64-gcc-libs-5.3.0 | 7 518 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
m2w64-gcc-libs-core-5.3.0 | 7 213 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
m2w64-gmp-6.1.0 | 2 689 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
m2w64-libwinpthread-git-5.0.0.4634.697f757| 2 30 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
markdown-2.6.11 | py_0 56 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
mkl-2017.0.3 | 0 126.3 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
msys2-conda-epoch-20160418 | 1 2 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
numpy-1.14.2 | py36h5c71026_0 3.7 MB defaults
protobuf-3.7.0 | py36he025d50_0 536 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
six-1.12.0 | py36_1000 21 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tensorboard-1.10.0 | py36_0 3.3 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tensorflow-1.10.0 | py36_0 32.2 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
termcolor-1.1.0 | py_2 6 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
werkzeug-0.14.1 | py_0 249 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
------------------------------------------------------------
Total: 171.3 MB
==============================================================================================================
【以上https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/**镜像源添加和设置请参见之前的博文】
# 查看虚拟环境
(tensorflow) C:\Users\jiangshan>conda info -e
# conda environments:
#
base S:\Users\jiangshan\Anaconda3
deeplearning S:\Users\jiangshan\Anaconda3\envs\deeplearning
tensorflow * S:\Users\jiangshan\Anaconda3\envs\tensorflow 【* 代表处于活动状态】
# 查看虚拟环境已经安装的包
(tensorflow) C:\Users\jiangshan>conda list
===============================================================================================================================
# packages in environment at S:\Users\jiangshan\Anaconda3\envs\tensorflow:
#
# Name Version Build Channel
absl-py 0.7.0 py36_1000 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
astor 0.7.1 py_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
blas 1.0 mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
ca-certificates 2019.3.9 hecc5488_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
certifi 2019.3.9 py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
gast 0.2.2 py_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
grpcio 1.16.0 py36hbb4b082_1000 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
icc_rt 2019.0.0 h0cc432a_1 defaults
libprotobuf 3.7.0 h1a1b453_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
m2w64-gcc-libgfortran 5.3.0 6 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
m2w64-gcc-libs 5.3.0 7 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
m2w64-gcc-libs-core 5.3.0 7 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
m2w64-gmp 6.1.0 2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
markdown 2.6.11 py_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
mkl 2017.0.3 0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
msys2-conda-epoch 20160418 1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
numpy 1.14.2 py36h5c71026_0 defaults
openssl 1.0.2r hfa6e2cd_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
pip 19.0.3 py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
protobuf 3.7.0 py36he025d50_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
python 3.6.7 he025d50_1004 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
setuptools 40.8.0 py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
six 1.12.0 py36_1000 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tensorboard 1.10.0 py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tensorflow 1.10.0 py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
termcolor 1.1.0 py_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
vc 14 0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
vs2015_runtime 14.0.25420 0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
werkzeug 0.14.1 py_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
wheel 0.33.1 py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
wincertstore 0.2 py36_1002 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
zlib 1.2.11 h2fa13f4_1004 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
===============================================================================================================================
# 测试
(tensorflow) C:\Users\jiangshan>python
Python 3.6.7 (default, Feb 28 2019, 07:28:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf 【不报错就表示安装成功】
>>> quit()
# 退出虚拟环境
(tensorflow) C:\Users\jiangshan>deactivate
原文地址:https://www.cnblogs.com/jeshy/p/10520337.html