0

我是使用 Python 的新手,我发现使用 Anaconda 对于新用户来说非常普遍 我正在尝试使用 Keras 开发 Faster-RCNN

当我通过命令“pip install tensorflow”在 Anaconda 上安装 Tensorflow 时,没有错误显示,响应如下:

Requirement already satisfied: tensorflow in d:\anaconda3\lib\site-packages (2.2.0)
Requirement already satisfied: termcolor>=1.1.0 in d:\anaconda3\lib\site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: grpcio>=1.8.6 in d:\anaconda3\lib\site-packages (from tensorflow) (1.29.0)
Requirement already satisfied: protobuf>=3.8.0 in d:\anaconda3\lib\site-packages (from tensorflow) (3.12.1)
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in d:\anaconda3\lib\site-packages (from tensorflow) (2.10.0)
Requirement already satisfied: six>=1.12.0 in d:\anaconda3\lib\site-packages (from tensorflow) (1.14.0)
Requirement already satisfied: scipy==1.4.1; python_version >= "3" in d:\anaconda3\lib\site-packages (from tensorflow) (1.4.1)
Requirement already satisfied: opt-einsum>=2.3.2 in d:\anaconda3\lib\site-packages (from tensorflow) (3.2.1)
Requirement already satisfied: wheel>=0.26; python_version >= "3" in d:\anaconda3\lib\site-packages (from tensorflow) (0.34.2)
Requirement already satisfied: absl-py>=0.7.0 in d:\anaconda3\lib\site-packages (from tensorflow) (0.9.0)
Requirement already satisfied: tensorboard<2.3.0,>=2.2.0 in d:\anaconda3\lib\site-packages (from tensorflow) (2.2.1)
Requirement already satisfied: tensorflow-estimator<2.3.0,>=2.2.0 in d:\anaconda3\lib\site-packages (from tensorflow) (2.2.0)
Requirement already satisfied: numpy<2.0,>=1.16.0 in d:\anaconda3\lib\site-packages (from tensorflow) (1.18.1)
Requirement already satisfied: gast==0.3.3 in d:\anaconda3\lib\site-packages (from tensorflow) (0.3.3)
Requirement already satisfied: keras-preprocessing>=1.1.0 in d:\anaconda3\lib\site-packages (from tensorflow) (1.1.2)
Requirement already satisfied: wrapt>=1.11.1 in d:\anaconda3\lib\site-packages (from tensorflow) (1.11.2)
Requirement already satisfied: google-pasta>=0.1.8 in d:\anaconda3\lib\site-packages (from tensorflow) (0.2.0)
Requirement already satisfied: astunparse==1.6.3 in d:\anaconda3\lib\site-packages (from tensorflow) (1.6.3)
Requirement already satisfied: setuptools in d:\anaconda3\lib\site-packages (from protobuf>=3.8.0->tensorflow) (45.2.0.post20200210)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in d:\anaconda3\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (0.4.1)
Requirement already satisfied: markdown>=2.6.8 in d:\anaconda3\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (3.2.2)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in d:\anaconda3\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (1.6.0.post3)
Requirement already satisfied: requests<3,>=2.21.0 in d:\anaconda3\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (2.22.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in d:\anaconda3\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (1.15.0)
Requirement already satisfied: werkzeug>=0.11.15 in d:\anaconda3\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (1.0.0)
Requirement already satisfied: requests-oauthlib>=0.7.0 in d:\anaconda3\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow) (1.3.0)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in d:\anaconda3\lib\site-packages (from markdown>=2.6.8->tensorboard<2.3.0,>=2.2.0->tensorflow) (1.5.0)
Requirement already satisfied: certifi>=2017.4.17 in d:\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow) (2019.11.28)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in d:\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in d:\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow) (1.25.8)
Requirement already satisfied: idna<2.9,>=2.5 in d:\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow) (2.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in d:\anaconda3\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow) (4.1.0)
Requirement already satisfied: rsa<4.1,>=3.1.4 in d:\anaconda3\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow) (4.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in d:\anaconda3\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow) (0.2.8)
Requirement already satisfied: oauthlib>=3.0.0 in d:\anaconda3\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow) (3.1.0)
Requirement already satisfied: zipp>=0.5 in d:\anaconda3\lib\site-packages (from importlib-metadata; python_version < "3.8"->markdown>=2.6.8->tensorboard<2.3.0,>=2.2.0->tensorflow) (2.2.0)
Requirement already satisfied: pyasn1>=0.1.3 in d:\anaconda3\lib\site-packages (from rsa<4.1,>=3.1.4->google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow) (0.4.8)

但是当我尝试使用 tensorflow 时,响应如下

Traceback (most recent call last):
  File "d:\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "d:\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "d:\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "d:\Anaconda3\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "d:\Anaconda3\lib\imp.py", line 342, 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 "d:\Anaconda3\lib\runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "d:\Anaconda3\lib\runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "d:\Anaconda3\lib\runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "d:\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "d:\Anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 50, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "d:\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 69, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "d:\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "d:\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "d:\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "d:\Anaconda3\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "d:\Anaconda3\lib\imp.py", line 342, 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

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

我无法使用 tensorflow 或 Keras,但没有明确的错误消息可以修复它,所以我需要您的建议

4

0 回答 0