python加载dll失败_python tensorflow导入DLL加载失败

news/2024/11/24 10:59:15/

我安装了最新的

python 3.6.4 x64版本

然后使用pip3为cpu-only安装tensorflow

C:\>pip3 install tensorflow

但是当我尝试在python中导入tensorflow时

它向我显示了以下错误

我确信我已经安装了Microsoft Visual C 2015 Redistributable(x64)

所以它不会是dll msvcp140.dll丢失的问题

它说“DLL加载失败,错误代码为-1073741795”

那么究竟是什么问题呢

我找不到有关此错误代码的任何其他信息

我的操作系统:Windows 7企业版服务包1/64位/英特尔酷睿i5 M 540

>>> import tensorflow

Traceback (most recent call last):

File "C:\Users\Alan\AppData\Local\Programs\Python\Python36\lib\site-packages\t

ensorflow\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\__ini

t__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 994, in _gcd_import

File "", line 971, in _find_and_load

File "", line 955, in _find_and_load_unlocked

File "", line 658, in _load_unlocked

File "", line 571, in module_from_spec

File "", line 922, in create_module

File "", line 219, in _call_with_frames_removed

ImportError: DLL load failed with error code -1073741795

During 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\t

ensorflow\python\pywrap_tensorflow.py", line 58, in

from tensorflow.python.pywrap_tensorflow_internal import *

File "C:\Users\Alan\AppData\Local\Programs\Python\Python36\lib\site-packages\t

ensorflow\python\pywrap_tensorflow_internal.py", line 21, in

_pywrap_tensorflow_internal = swig_import_helper()

File "C:\Users\Alan\AppData\Local\Programs\Python\Python36\lib\site-packages\t

ensorflow\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\__ini

t__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 1, in

File "C:\Users\Alan\AppData\Local\Programs\Python\Python36\lib\site-packages\t

ensorflow\__init__.py", line 24, in

from tensorflow.python import *

File "C:\Users\Alan\AppData\Local\Programs\Python\Python36\lib\site-packages\t

ensorflow\python\__init__.py", line 49, in

from tensorflow.python import pywrap_tensorflow

File "C:\Users\Alan\AppData\Local\Programs\Python\Python36\lib\site-packages\t

ensorflow\python\pywrap_tensorflow.py", line 74, in

raise ImportError(msg)

ImportError: Traceback (most recent call last):

File "C:\Users\Alan\AppData\Local\Programs\Python\Python36\lib\site-packages\t

ensorflow\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\__ini

t__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 994, in _gcd_import

File "", line 971, in _find_and_load

File "", line 955, in _find_and_load_unlocked

File "", line 658, in _load_unlocked

File "", line 571, in module_from_spec

File "", line 922, in create_module

File "", line 219, in _call_with_frames_removed

ImportError: DLL load failed with error code -1073741795

During 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\t

ensorflow\python\pywrap_tensorflow.py", line 58, in

from tensorflow.python.pywrap_tensorflow_internal import *

File "C:\Users\Alan\AppData\Local\Programs\Python\Python36\lib\site-packages\t

ensorflow\python\pywrap_tensorflow_internal.py", line 21, in

_pywrap_tensorflow_internal = swig_import_helper()

File "C:\Users\Alan\AppData\Local\Programs\Python\Python36\lib\site-packages\t

ensorflow\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\__ini

t__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, 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_probl

ems

for some common reasons and solutions. Include the entire stack trace

above this error message when asking for help.


http://www.ppmy.cn/news/488245.html

相关文章

模块“XXX.dll”加载失败

具体问题:模块“XXX.dll”加载失败 请确保该二进制存储在指定的路径中,或者调试它以检查该二进制或相关的.DLL文件是否有问题 找不到指定的模块。 1.在安装C++软件的时候,有时候安装失败提示“请确保二进制储存在指定的路径中,或者调试他以检查该二进制或相关的DLL文件”…

[模块加载失败:找不到指定的模块]——如何解决DLL加载问题?

[模块加载失败:找不到指定的模块]——如何解决DLL加载问题? 如果您在使用Windows操作系统时,遇到了“模块加载失败:找不到指定的模块”这样的错误提示,那么您很可能遇到了DLL(动态链接库)加载问题。本文将为您介绍该问题的原因及解决方法。 什么是DLL文件? DLL(Dyn…

【云原生】二进制部署k8集群(上)搭建单机matser和etcd集群

1. 单机matser预部署设计 目前Kubernetes最新版本是v1.25,但大部分公司一般不会使用最新版本。 目前公司使用比较多的:老版本是v1.15,因为v1.16改变了很多API接口版本,国内目前使用比较多的是v1.18、v1.20。 组件部署&#xff1a…

TS-2023 拥堵情况下的电动汽车选址与定容

论文时间线【2021年11月26投稿,2023年6月16出版】 Received:November 26, 2021Accepted:May 08, 2023Published Online:June 16, 2023 论文连接 GB引用格式: Kınay B, Gzara F, Alumur S A. Charging Station Location and Sizing for Electric Ve…

发布高端产品G5,还要把旗舰店开遍美国和欧洲 雅迪葫芦里卖的什么药?

文|曾响铃 来源|科技向令说(xiangling0815) 好的产品,应该是能够引领行业潮流。在前不久,道琼斯旗下财经媒体《MarketWatch》就大篇幅的报道了中国品牌雅迪在米兰国际摩托车展发布面向高端市场的智能锂电两轮车G5。雅迪将这款车首…

数字广东:共建区块链开源生态,实现高水平科技自立自强

近日,在2023年第1季社区Task挑战赛中,众多开发者为FISCO BCOS开源项目及周边组件贡献了丰富的代码和教程。其中,作为金链盟开源工作组成员,数字广东网络建设有限公司科技发展部的数字信任中心团队参与了共建。 数字广东网络建设…

对象的构造

问题 对象中成员变量的初始值是多少&#xff1f; 成员变量的初始值 #include <stdio.h>class Test { private:int i;int j; public:int getI() { return i; }int getJ() { return j; } };Test gt;int main() {printf("gt.i %d\n", gt.getI());printf("…

【Leetcode60天带刷】day20二叉树—— 654.最大二叉树 , 617.合并二叉树 , 700.二叉搜索树中的搜索 , 98.验证二叉搜索树

题目&#xff1a; 530. 二叉搜索树的最小绝对差 给你一个二叉搜索树的根节点 root &#xff0c;返回 树中任意两不同节点值之间的最小差值 。 差值是一个正数&#xff0c;其数值等于两值之差的绝对值。 示例 1&#xff1a; 输入&#xff1a;root [4,2,6,1,3] 输出&#xff1…