然后使用pip3为cpu-only安装tensorflow
C:\>pip3 install tensorflow
但是当我尝试在python中导入tensorflow时
它向我显示了以下错误
我确信我已经安装了Microsoft Visual C 2015 Redistributable(x64)
所以它不会是dll msvcp140.dll丢失的问题
那么究竟是什么问题呢
我找不到有关此错误代码的任何其他信息
我的 *** 作系统:windows 7企业版服务包1/64位/英特尔酷睿i5 M 540
>>> import tensorflowTraceback (most recent call last): file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",line 18,in swig_import_helper return importlib.import_module(mname) file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\importlib\__init__.py",line 126,in import_module return _bootstrap._gcd_import(name[level:],package,level) file "<froZen importlib._bootstrap>",line 994,in _gcd_import file "<froZen importlib._bootstrap>",line 971,in _find_and_load file "<froZen importlib._bootstrap>",line 955,in _find_and_load_unlocked file "<froZen importlib._bootstrap>",line 658,in _load_unlocked file "<froZen importlib._bootstrap>",line 571,in module_from_spec file "<froZen importlib._bootstrap_external>",line 922,in create_module file "<froZen importlib._bootstrap>",line 219,in _call_with_frames_removedimportError: DLL load Failed with error code -1073741795During handling of the above exception,another exception occurred:Traceback (most recent call last): file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",line 58,in <module> from tensorflow.python.pywrap_tensorflow_internal import * file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",line 21,in <module> _pywrap_tensorflow_internal = swig_import_helper() file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",line 20,in swig_import_helper return importlib.import_module('_pywrap_tensorflow_internal') file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\importlib\__init__.py",level)ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'During handling of the above exception,another exception occurred:Traceback (most recent call last): file "<stdin>",line 1,in <module> file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\site-packages\tensorflow\__init__.py",line 24,in <module> from tensorflow.python import * file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\site-packages\tensorflow\python\__init__.py",line 49,in <module> from tensorflow.python import pywrap_tensorflow file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",line 74,in <module> raise importError(msg)importError: Traceback (most recent call last): file "C:\Users\Alan\AppData\Local\Programs\Python\python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",level)ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'Failed to load the native TensorFlow runtime.See https://www.tensorflow.org/install/install_sources#common_installation_problemsfor some common reasons and solutions. Include the entire stack traceabove this error message when asking for help.解决方法 在win7 64bit(Intel Core 2 Duo cpu T6670 2.2GHz)上,我遇到了与tensorflow1.6-cpu相同的问题
在我找到这个之后,它解决了我的问题.
参考此问题:https://github.com/tensorflow/tensorflow/issues/17386
由tensorflow-1.6.0-cp36-cp36m-win_amd64.whl:https://github.com/fo40225/tensorflow-windows-wheel/tree/master/1.6.0/py36/CPU/sse2重新安装
希望这个.whl可以帮助你.
总结以上是内存溢出为你收集整理的python tensorflow导入DLL加载失败全部内容,希望文章能够帮你解决python tensorflow导入DLL加载失败所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)