导入时间时出现运行时错误。显示运行时错误

时间:2017-12-22 22:43:05

标签: python runtime-error keras

import keras
Using TensorFlow backend.
Traceback (most recent call last):

  File "<ipython-input-4-88d96843a926>", line 1, in <module>
    import keras

  File "/Users/rgala98/anaconda3/lib/python3.6/site-packages/keras/__init__.py", line 3, in <module>
    from . import utils

  File "/Users/rgala98/anaconda3/lib/python3.6/site-packages/keras/utils/__init__.py", line 6, in <module>
    from . import conv_utils

  File "/Users/rgala98/anaconda3/lib/python3.6/site-packages/keras/utils/conv_utils.py", line 3, in <module>
    from .. import backend as K

  File "/Users/rgala98/anaconda3/lib/python3.6/site-packages/keras/backend/__init__.py", line 83, in <module>
    from .tensorflow_backend import *

  File "/Users/rgala98/anaconda3/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 2, in <module>
    from tensorflow.python.training import moving_averages

  File "<frozen importlib._bootstrap>", line 971, in _find_and_load

  File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 890, in _find_spec

  File "<frozen importlib._bootstrap>", line 864, in _find_spec_legacy

  File "/Users/rgala98/anaconda3/lib/python3.6/site-packages/pyximport/pyximport.py", line 253, in find_module
    fp, pathname, (ext,mode,ty) = imp.find_module(fullname,package_path)

  File "/Users/rgala98/anaconda3/lib/python3.6/imp.py", line 271, in find_module
    "not {}".format(type(path)))

RuntimeError: 'path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'>

0 个答案:

没有答案