简体   繁体   English

Windows 10,Python 3.6和64位上的Tensorflow的DLL加载失败

[英]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. 错误:尝试从我的Python 3.6安装目录导入Tensorflow。

My Python 3.6 is installed here: C:\\Python36 . 我的Python 3.6安装在这里: 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: 我所做的只是python -m pip install tensorflow=1.5要测试安装,我运行了导入Tensorflow,但发现此错误:

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 降级到Python 1.5

  2. Getting the Windows redistributable that StackOverflow mentions here: On Windows, running "import tensorflow" generates No module named "_pywrap_tensorflow" error 获取StackOverflow在此处提到的Windows可再发行组件: 在Windows上,运行“ import tensorflow”不会生成名为“ _pywrap_tensorflow”的模块错误

    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. 我尝试通过重新安装带有所有debugginf符号和dll的Python 3.6来尝试另一种解决方案,但现在出现错误:我尝试通过重新安装带有所有debugginf符号和dll的Python 3.6来尝试另一种解决方案,但是现在我得到了错误:C:\\ Python36> python Win32上的Python 3.6.2(v3.6.2:5fd33b5,2017年7月8日,04:57:36)[MSC v.1900 64位(AMD64)]键入“帮助”,“版权”,“信用”或“许可证”欲获得更多信息。

    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!' 将tensorflow导入为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]您的CPU支持该TensorFlow二进制文件未编译为使用的指令:AVX AVX2 print(sess.run(hello))b'Hello,TensorFlow!” does this mean tensorflow worked or not? 这是否意味着tensorflow起作用或不起作用?

I had multiple python paths in the PATH variable in my system's environment variables. 我的系统环境变量中的PATH变量中有多个python路径。

I installed Python 3.6.2 and then put the path in the environment variables, removing the other paths. 我安装了Python 3.6.2,然后将路径放入环境变量中,删除了其他路径。

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. 我建议您尽可能使用anaconda,它就像咒语一样工作,并且您不必处理任何事情,我也知道那句话,只是愿意放弃,并采取简单的方法。 https://www.tensorflow.org/install/install_windows and here is the download page for anaconda https://www.anaconda.com/download/ https://www.tensorflow.org/install/install_windows ,这是anaconda的下载页面https://www.anaconda.com/download/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Windows 10 64 位、Python 3.6 上安装 pygraphviz - Installing pygraphviz on Windows 10 64-bit, Python 3.6 导入cv2:ImportError:DLL加载失败:Windows 7 Anaconda 4.3.0(64位)Python 3.6.0 - Import cv2: ImportError: DLL load failed: windows 7 Anaconda 4.3.0 (64-bit) Python 3.6.0 python无法在64位Windows上加载64位DLL - python failed to load 64 bit DLL on a 64 bit Windows 无法加载本地TensorFlow运行时。 Windows 10上的Python 3.6 - Failed to load the native TensorFlow runtime. Python 3.6 on Windows 10 Python pylab ImportError:DLL加载失败Windows 7 64位 - Python pylab ImportError: DLL load failed Windows 7 64 Bit 64位cx_Oracle:DLL加载失败 - 64-bit cx_Oracle: DLL load failed 如何在 python 3.86 OS Windows 10 (64-bit) 中安装 tensorflow - How to install tensorflow in python 3.86 OS Windows 10 (64-bit) ImportError:DLL加载失败:操作系统无法运行%1。 Python 2.7.12 | Anaconda 4.2.0(64位) - ImportError: DLL load failed: The operating system cannot run %1. Python 2.7.12 |Anaconda 4.2.0 (64-bit) 64位python 2.5 / 2.6 + windows 7“导入套接字”DLL加载错误 - 64-bit python 2.5/2.6+windows 7 “import socket” DLL load error 使用Python 3.6在Windows 64位上安装Tensorflow - Tensorflow installation on Windows 64bit with Python 3.6
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM