Python Tensorflow错误:导入错误:DLL加载失败:找不到指定的模块

Python Tensorflow错误:导入错误:DLL加载失败:找不到指定的模块,python,tensorflow,anaconda,tensorflow2.0,yolo,Python,Tensorflow,Anaconda,Tensorflow2.0,Yolo,我已经查阅了以前类似问题的答案,但找不到适合我的答案 我在TensorFlow工作了很长时间。目前正在试用Yolov4,它需要使用Tensorflow 2.3.0版,所以我决定安装它 Anaconda的最新版本是2.1.0,在我的电脑上运行得非常好。因此,由于这还不够,我创建了一个新环境,并使用pip install Tensorflow gpu安装了Tensorflow,该gpu安装2.3.0版时似乎没有错误 然后对于导入tensorflow作为tf我得到了这个错误。有什么办法来解决这个问题吗

我已经查阅了以前类似问题的答案,但找不到适合我的答案

我在TensorFlow工作了很长时间。目前正在试用Yolov4,它需要使用Tensorflow 2.3.0版,所以我决定安装它

Anaconda的最新版本是2.1.0,在我的电脑上运行得非常好。因此,由于这还不够,我创建了一个新环境,并使用
pip install Tensorflow gpu安装了Tensorflow,该gpu安装2.3.0版时似乎没有错误

然后对于
导入tensorflow作为tf
我得到了这个错误。有什么办法来解决这个问题吗

>>> import tensorflow as tf
Traceback (most recent call last):
  File "C:\Users\mazat\Anaconda3\envs\tf23\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mazat\Anaconda3\envs\tf23\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\mazat\Anaconda3\envs\tf23\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
    from tensorflow.python.eager import context
  File "C:\Users\mazat\Anaconda3\envs\tf23\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
    from tensorflow.python import pywrap_tfe
  File "C:\Users\mazat\Anaconda3\envs\tf23\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\mazat\Anaconda3\envs\tf23\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\mazat\Anaconda3\envs\tf23\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: The specified module could not be found.
>>将tensorflow作为tf导入
回溯(最近一次呼叫最后一次):
文件“C:\Users\mazat\Anaconda3\envs\tf23\lib\site packages\tensorflow\python\pywrap\u tensorflow.py”,第64行,在
从tensorflow.python.\u pywrap\u tensorflow\u内部导入*
ImportError:DLL加载失败:找不到指定的模块。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“C:\Users\mazat\Anaconda3\envs\tf23\lib\site packages\tensorflow\\uuuu init\uuuu.py”,第41行,在
从tensorflow.python.tools将模块_util作为_模块_util导入
文件“C:\Users\mazat\Anaconda3\envs\tf23\lib\site packages\tensorflow\python\\uuuu init\uuu.py”,第40行,在
从tensorflow.python.eager导入上下文
文件“C:\Users\mazat\Anaconda3\envs\tf23\lib\site packages\tensorflow\python\eager\context.py”,第35行,在
从tensorflow.python导入pywrap\u tfe
文件“C:\Users\mazat\Anaconda3\envs\tf23\lib\site packages\tensorflow\python\pywrap\u tfe.py”,第28行,在
从tensorflow.python导入pywrap\u tensorflow
文件“C:\Users\mazat\Anaconda3\envs\tf23\lib\site packages\tensorflow\python\pywrap\u tensorflow.py”,第83行,在
提高效率(msg)
ImportError:回溯(最近一次呼叫上次):
文件“C:\Users\mazat\Anaconda3\envs\tf23\lib\site packages\tensorflow\python\pywrap\u tensorflow.py”,第64行,在
从tensorflow.python.\u pywrap\u tensorflow\u内部导入*
ImportError:DLL加载失败:找不到指定的模块。

看起来问题出在旧版本的Visual Studio可再发行版本上。 从这里开始的新版本,到目前为止似乎还有效


看起来问题出在旧版本的Visual Studio可再发行版本上。 从这里开始的新版本,到目前为止似乎还有效


我有一个类似的问题,更新Visual Studio()对我有效。

我有一个类似的问题,更新Visual Studio()对我有效。

在我的情况下,解决方案来自以下方面。我安装了1。最新的cuda(cuda_11.1.0_456.43_win10.exe from)和2。vc_redist.x64包(vc_redist.x64.exe from)在我的例子中,解决方案来自以下方面。我安装了1。最新的cuda(cuda_11.1.0_456.43_win10.exe from)和2。vc_redist.x64包(vc_redist.x64.exe from)请不要使用仅链接回答。请提供一些上下文示例。将来链接可能不起作用,您的答案将是无用的请不要使用链接唯一的答案。请提供一些上下文示例。将来这个链接可能不起作用,你的答案也没用