gpt4 book ai didi

python - 导入错误 : No module named yaml in Keras (neural network)

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

我已经成功安装了 Keras API 和 python 在 TensorFlow 上使用的其他要求,但是当我导入它时出现以下错误。

Traceback (most recent call last):
File "facenet.py", line 1, in <module>
from keras import backend as K
File "build/bdist.linux-x86_64/egg/keras/__init__.py", line 3, in <module>
File "build/bdist.linux-x86_64/egg/keras/utils/__init__.py", line 25, in <module>
File "build/bdist.linux-x86_64/egg/keras/utils/training_utils.py", line 7, in <module>
File "build/bdist.linux-x86_64/egg/keras/layers/__init__.py", line 4, in <module>
File "build/bdist.linux-x86_64/egg/keras/engine/__init__.py", line 3, in <module>
File "build/bdist.linux-x86_64/egg/keras/engine/topology.py", line 10, in <module>
ImportError: No module named yaml

最佳答案

看起来你没有安装 yaml 模块,如果你使用带有 pip 的虚拟环境,请执行以下操作:

pip install yaml

如果您使用的是 anaconda,请执行以下操作:

conda install -c anaconda yaml

关于python - 导入错误 : No module named yaml in Keras (neural network),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48982092/

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