windows 安装 tensorflow 时出现DLL not found的错误

本文解决了Python安装TensorFlow时DLL加载失败的问题。错误原因是未勾选下载调试二进制文件选项,解决方法为安装Microsoft Visual C++ 2015 Redistributable Update 3 x64,并重新运行Python安装程序勾选相应选项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

是因为在装python3的时候没有勾选Download debug binaries (requires VS 2015 or later ),报错:

Traceback (most recent call last):
  File "C:\Users\mark\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 19, in swig_import_helper
    return importlib.import_module(mname)
  File "C:\Users\mark\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 906, in create_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

解决方法: 
Install Microsoft Visual C++ 2015 Redistributable Update 3 x64.

在这之后进入到python3的安装程序,选择repair模式将Download debug binaries (requires VS 2015 or later )选上后安装

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值