Python:ModuleNotFoundError:没有名为“客户端”的模块

玩具机器人

我是 python 新手,出现以下错误:

ModuleNotFoundError: 没有名为“客户端”的模块

我的项目结构如下:

我的项目:

.. 客户端(包)

... 应用程序.py

... main.py

... __init__.py

我的代码:

"""main.py"""

from Client import Application

app = Application()
app.start()

"""Application.py"""
class Application:

def start(self):
    self.loop()

def loop(self):
    while True:
        pass

谁能解释为什么 interpeter 找不到我的模块?

jmonster555games

有点只是在某种程度上重复橙色。您的主文件与您所说的在客户端包中的应用程序位于同一文件中,但它与 main.py 不在同一目录中,因此它只是

import application

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

ModuleNotFoundError:没有名为“python”的模块

suds安装错误:没有名为客户端的模块

suds安装错误:没有名为客户端的模块

Ubuntu 14.04:ImportError:没有名为客户端的模块

MacOS,Python:ModuleNotFoundError:没有名为“ kiwisolver”的模块

ModuleNotFoundError:Python中没有名为“ sksurv”的模块

Anaconda Python:ModuleNotFoundError:没有名为“ matlab”的模块

Python导入-ModuleNotFoundError:没有名为X的模块

ModuleNotFoundError:没有名为“sklearn”的模块python

Python导入ModuleNotFoundError:没有名为'model'的模块

ModuleNotFoundError:没有名为“ gi”的模块-Python-OsX

ModuleNotFoundError:没有名为错误python 3.8.2的模块

ModuleNotFoundError:Python 中没有名为“plyer”的模块

ModuleNotFoundError:在python 3.9中没有名为“ scipy”的模块

Python:ModuleNotFoundError:没有名为“ stats”的模块

Python ModuleNotFoundError:没有名为“ azure.cognitiveservices”的模块

Python 3 ModuleNotFoundError:没有名为“numpy”的模块

ModuleNotFoundError:没有名为“tensorflow.python”的模块Anaconda

ModuleNotFoundError:python中没有名为“src”的模块

ModuleNotFoundError:在Python IDE中没有名为“ seaborn”的模块

ModuleNotFoundError:在Python 3.6.7上没有名为“ google”的模块

Python ModuleNotFoundError:没有名为“socceraction.classification”的模块

Python ModuleNotFoundError:没有名为“ returndata”的模块

Python错误:ModuleNotFoundError:没有名为“ <moduleName>”的模块

ModuleNotFoundError:python中没有名为“display”的模块

Python:ModuleNotFoundError:没有名为“ requests”的模块

Python/Tkinter:ModuleNotFoundError:没有名为“_tkinter”的模块

Python ModuleNotFoundError 没有名为“自定义”的模块

ModuleNotFoundError:没有名为“src”的模块(Python)