gpt4 book ai didi

python - ImportError:无法在 Keras 中导入名称 '_ccallback_c'

转载 作者:太空宇宙 更新时间:2023-11-04 06:40:45 25 4
gpt4 key购买 nike

当我尝试导入 keras 时出现导入错误。我对 Tensorflow 没有任何问题,它在我的笔记本电脑上运行良好。我删除了 Keras 安装的目录并重新安装,但仍然出现错误。我尝试使用较低版本的 python,但仍然出现错误。

    Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2\helpers\pydev\pydevd.py", line 1664, in <module>
main()
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/yym30/PycharmProjects/Neurofiling/csv_practice/keras_prtc.py", line 2, in <module>
from keras.datasets import mnist
File "C:\Users\yym30\Anaconda3\envs\Neurofiler\lib\site-packages\keras\__init__.py", line 3, in <module>
from . import utils
File "C:\Users\yym30\Anaconda3\envs\Neurofiler\lib\site-packages\keras\utils\__init__.py", line 26, in <module>
from .multi_gpu_utils import multi_gpu_model
File "C:\Users\yym30\Anaconda3\envs\Neurofiler\lib\site-packages\keras\utils\multi_gpu_utils.py", line 7, in <module>
from ..layers.merge import concatenate
File "C:\Users\yym30\Anaconda3\envs\Neurofiler\lib\site-packages\keras\layers\__init__.py", line 4, in <module>
from ..engine.base_layer import Layer
File "C:\Users\yym30\Anaconda3\envs\Neurofiler\lib\site-packages\keras\engine\__init__.py", line 8, in <module>
from .training import Model
File "C:\Users\yym30\Anaconda3\envs\Neurofiler\lib\site-packages\keras\engine\training.py", line 21, in <module>
from . import training_arrays
File "C:\Users\yym30\Anaconda3\envs\Neurofiler\lib\site-packages\keras\engine\training_arrays.py", line 8, in <module>
from scipy.sparse import issparse
File "C:\Users\yym30\AppData\Roaming\Python\Python36\site-packages\scipy\__init__.py", line 118, in <module>
from scipy._lib._ccallback import LowLevelCallable
File "C:\Users\yym30\AppData\Roaming\Python\Python36\site-packages\scipy\_lib\_ccallback.py", line 1, in <module>
from . import _ccallback_c
ImportError: cannot import name '_ccallback_c'

这是完整的错误信息。

最佳答案

'_ccallback_c' 要么从错误的位置被调用,要么拼写错误,要么不在目录中。

关于python - ImportError:无法在 Keras 中导入名称 '_ccallback_c',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51713671/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com