[英]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: 我尝试的选项:
Downgrading to Python 1.5 降级到Python 1.5
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”的模块错误
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.