Python模块导入出现ModuleNotFoundError: No module named ‘***’

tttt68635 48 0 PDF 2021-02-01 00:02:21

Traceback (most recent call last): File /usr/flink/alert/server/greeter_server.py, line 8, in from example import helloworld_pb2, helloworld_pb2_grpc ModuleNotFoundError: No module named 'example' ​1、Python中,每个py文件被称之为模块,每个具有_init_.py文件的目录被称为包。只要模块或者包所在的目录在sys.path中,就可以使用import模块或者import包来使

用户评论
请输入评论内容
评分:
暂无评论