简体   繁体   English

如何在 Python 3.8 上修复此导入错误 - PyCharm

[英]How can I fix this import error on Python 3.8 - PyCharm

Here is the error when I try to run the program:这是我尝试运行程序时的错误:

File "/Users/kids/venv/lib/python3.8/site-packages/keras/__init__.py", line 3, in <module>
    from .keras import activations
ModuleNotFoundError: No module named 'keras.keras'

Process finished with exit code 1

And, this is the line that it is saying that has a issue:而且,这就是它所说的有问题的行:

from .keras import activations

It looks that the error is at the dot (.) before keras name.看起来错误在 keras 名称之前的点 (.) 处。 Try:尝试:

from keras import activations

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM