AKever

导航

TensorFlow环境搭建

TensorFlow环境搭建

=======================================================

http://blog.csdn.net/u010099080/article/details/53418159

 

博客推荐

======================================================

https://www.leiphone.com/news/201705/6Zi5evpIaKJRHsJj.html

http://blog.csdn.net/xukaiwen_2016/article/details/70880694

http://blog.csdn.net/cxmscb/article/details/71023576

 

环境(python3.5.4+tensorflow0.12)

======================================================

window7-64bit

i7 + 8g

======================================================

 

小程序测试:http://www.cnblogs.com/TS-qrt/articles/tf_first.html

 

1. 安装vs2013, -- 系统管理员权限运行
2. 安装python3.5.4-64bit,勾选pip
3. 安装TensorFlow

pip3 install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0-cp35-cp35m-win_amd64.whl
测试: import tensorflow as tf

报错:一丢丢

... ...
ImportError: No module named '_pywrap_tensorflow'
... ...
ImportError: DLL load failed: 找不到指定的模块。
... ...

4. vc_redist.x64.exe(解决3的报错)
5. 测试TensorFlow

C:\Users\Administrator>python
>>> import tensorflow as tf >>> hello = tf.constant('Hello, TensorFlow!') >>> sess = tf.Session() >>> print(sess.run(hello)) Hello, TensorFlow! >>> a = tf.constant(10) >>> b = tf.constant(32) >>> print(sess.run(a + b))
  42
>>

6. 安装 Anaconda(支持3.6)

How do I get Anaconda with Python 3.5?
There are three ways to get Anaconda with Python 3.5:

We recommend that you download the latest version of Anaconda and then make a Python 3.5 environment.
Or download the latest version of Anaconda and run this command to install Python 3.5 in the root environment: conda install python=3.5
Or download the most recent Anaconda that included Python 3.5 by default, Anaconda 4.2.0. You can download it from our archive. Scroll down the page until you find version 4.2.0 for your platform.

 ps: 配置环境变量

C:\ProgramData\Anaconda3\Scripts

 

 

未测试版本

python 使用3.6.2
tensorflow使用 pip3 install --upgrade tensorflow(1.3版本)

附:

1. 安装vs2013, -- 系统管理员权限运行
2. 安装python3.6.2,勾选pip

3. 安装Anaconda4.4.0

===============================================
4. 安装TensorFlow
# GPU版本
pip3 install --upgrade tensorflow-gpu

# CPU版本(我装的是这个)
====== 报错没用版本 =======================
pip3 install --upgrade tensorflow
pip3 install tensorflow --更新 

====== 使用版本 ============================
pip3 install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0-cp35-cp35m-win_amd64.whl


5. 安装CUDA 8.0
测试一下是否安装成功,命令行输入 nvcc -V ,看到版本信息就表示安装成功了

6. 安装cuDNN 5.1
其实这个是一个压缩包,解压放到任何一个目录下就行,然后把你放的那个目录添加到Path 环境变量里

posted on 2017-08-19 12:55  AKever  阅读(235)  评论(0)    收藏  举报