简体   繁体   中英

DLL load failed for Tensorflow on Windows 10, Python 3.6 and 64-bit

The error: on trying to import Tensorflow from my Python 3.6 installation directory.

My Python 3.6 is installed here: C:\\Python36 . All I did was python -m pip install tensorflow=1.5 To test the installation I ran import Tensorflow, but found this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "C:\Python36\lib\site-packages\tensorflow\python\__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "C:\Python36\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "C:\Python36\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.

The options I tried:

  1. Downgrading to Python 1.5

  2. Getting the Windows redistributable that StackOverflow mentions here: On Windows, running "import tensorflow" generates No module named "_pywrap_tensorflow" error

    1. I tried another solution by reinstalling Python 3.6 with all the debugginf symbols and dlls but now I get the error :I tried another solution by reinstalling Python 3.6 with all the debugginf symbols and dlls but now I get the error : C:\\Python36>python Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

    import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() 2018-09-17 17:51:52.231635: IC:\\tf_jenkins\\workspace\\rel-win\\M\\windows\\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 print(sess.run(hello)) b'Hello, TensorFlow!' does this mean tensorflow worked or not?

I had multiple python paths in the PATH variable in my system's environment variables.

I installed Python 3.6.2 and then put the path in the environment variables, removing the other paths.

Thanks

i would suggest you just use anaconda if possible it works like a charm, and you don't have to manege anything, i too got that messege, and just desided to give up, and take the easy way. https://www.tensorflow.org/install/install_windows and here is the download page for anaconda https://www.anaconda.com/download/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM