Python 使用tensorflow时获取错误消息

Python 使用tensorflow时获取错误消息,python,tensorflow,machine-learning,chatbot,tflearn,Python,Tensorflow,Machine Learning,Chatbot,Tflearn,我已经用pip命令安装了tensorflow。但每当我试图通过导入在代码中使用它时,就会出现错误。我不明白为什么我会犯这个错误。我也无法使用tflearn。我最近刚刚开始用python编写代码。以下是错误消息: 正确的观点: 您需要从.< /p>下载并安装/更新微软Visual C++ +2015-2019可重分发(X64) 如果您面临任何其他问题,可能的原因如下 您的CPU不支持AVX2指令 您的CPU/Python是32位的 系统中有一个库位于其他位置/未安装,无法加载 请参阅windo

我已经用pip命令安装了tensorflow。但每当我试图通过导入在代码中使用它时,就会出现错误。我不明白为什么我会犯这个错误。我也无法使用tflearn。我最近刚刚开始用python编写代码。以下是错误消息:

正确的观点:


您需要从.< /p>下载并安装/更新微软Visual C++ +2015-2019可重分发(X64) 如果您面临任何其他问题,可能的原因如下

  • 您的CPU不支持AVX2指令
  • 您的CPU/Python是32位的
  • 系统中有一个库位于其他位置/未安装,无法加载
请参阅windows和的测试生成配置

Traceback (most recent call last):
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\imp.py", line 343, in load_dynamic
return _load(spec)
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\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow\__init__.py", line 101, in <module>
from tensorflow_core import *
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow_core\__init__.py", line 40, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow_core\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\Aaman\anaconda3\envs\chatbot\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors
C:\Users\Aaman>pip show tensorflow     
Name: tensorflow     
Version: 2.1.0       
Summary: TensorFlow is an open source machine learning framework for everyone.   
Home-page: https://www.tensorflow.org/     
Author: Google Inc.      
Author-email: packages@tensorflow.org        
License: Apache 2.0        
Location: c:\users\aaman\anaconda3\envs\chatbot\lib\site-packages      
Requires: protobuf, scipy, keras-applications, keras-preprocessing, absl-py, tensorboard, wrapt, opt-einsum, google-pasta, astor, numpy, tensorflow-estimator, six, wheel, grpcio, gast, termcolor
Required-by: