Tensorflow of python36 in win10

我系统WIN10 

  • 1 python36

C:\Users\python
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

  • 2  Tensorflow

中间的numpy-1.14.0-cp36-none-win_amd64太大,去python官网下来离线

pip install tensorflow_gpu-1.5.0-cp36-cp36m-win_amd64.whl

Processing d:\python\tensorflow\pack\tensorflow_gpu-1.5.0-cp36-cp36m-win_amd64.whl
Collecting absl-py>=0.1.6 (from tensorflow-gpu==1.5.0)
  Cache entry deserialization failed, entry ignored
Collecting tensorflow-tensorboard<1.6.0,>=1.5.0 (from tensorflow-gpu==1.5.0)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading tensorflow_tensorboard-1.5.0-py3-none-any.whl (3.0MB)
    100% |████████████████████████████████| 3.0MB 18kB/s
Requirement already satisfied: numpy>=1.12.1 in c:\users\wayne\appdata\local\programs\python\python36\lib\site-packages (from tensorflow-gpu==1.5.0)
Collecting wheel>=0.26 (from tensorflow-gpu==1.5.0)
  Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
    100% |████████████████████████████████| 51kB 10kB/s
Collecting protobuf>=3.4.0 (from tensorflow-gpu==1.5.0)
  Using cached protobuf-3.5.1-py2.py3-none-any.whl
Collecting six>=1.10.0 (from tensorflow-gpu==1.5.0)
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting markdown>=2.6.8 (from tensorflow-tensorboard<1.6.0,>=1.5.0->tensorflow-gpu==1.5.0)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading Markdown-2.6.11-py2.py3-none-any.whl (78kB)
    100% |████████████████████████████████| 81kB 13kB/s
Collecting werkzeug>=0.11.10 (from tensorflow-tensorboard<1.6.0,>=1.5.0->tensorflow-gpu==1.5.0)
  Downloading Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
    100% |████████████████████████████████| 327kB 22kB/s
Collecting html5lib==0.9999999 (from tensorflow-tensorboard<1.6.0,>=1.5.0->tensorflow-gpu==1.5.0)
  Cache entry deserialization failed, entry ignored
Collecting bleach==1.5.0 (from tensorflow-tensorboard<1.6.0,>=1.5.0->tensorflow-gpu==1.5.0)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading bleach-1.5.0-py2.py3-none-any.whl
Collecting futures>=3.1.1 (from tensorflow-tensorboard<1.6.0,>=1.5.0->tensorflow-gpu==1.5.0)
  Cache entry deserialization failed, entry ignored
Requirement already satisfied: setuptools in c:\users\wayne\appdata\local\programs\python\python36\lib\site-packages (from protobuf>=3.4.0->tensorflow-gpu==1.5.0)
Installing collected packages: six, absl-py, markdown, wheel, werkzeug, html5lib, protobuf, bleach, futures, tensorflow-tensorboard, tensorflow-gpu
Successfully installed absl-py-0.1.10 bleach-1.5.0 futures-3.1.1 html5lib-0.9999999 markdown-2.6.11 protobuf-3.5.1 six-1.11.0 tensorflow-gpu-1.5.0 tensorflow-tensorboard-1.5.0 werkzeug-0.14.1 wheel-0.30.0

3 运行例子

>>> import tensorflow as tf
>>> hellow=tf.constant("hellow!")
>>> sess=tf.Session()
2018-02-01 14:38:07.080696: I C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2018-02-01 14:38:07.092016: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_driver.cc:406] failed call to cuInit: CUDA_ERROR_UNKNOWN
2018-02-01 14:38:07.093864: I C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_diagnostics.cc:158] retrieving CUDA diagnostic information for host: DESKTOP-SMGO2TM
2018-02-01 14:38:07.093973: I C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_diagnostics.cc:165] hostname: DESKTOP-SMGO2TM
>>> print(sess.run(hellow))
b'hellow!'
>>>

问题

  cudart64_90.dll   直接NV官网取下

  cudnn64_7.dll     这个需要到NV的develop里面下

你可能感兴趣的:(TensorFlow)