我可以安装模块

时间:2019-12-20 02:18:34

标签: python

我在其中输入

class Hello(object):
    def hello(self, name='world'):
        print('Hello, %s.' % name)

但是当我导入时:

from hello import Hello

它引发了一个错误:

Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    from hello import Hello
ModuleNotFoundError: No module named 'hello'

0 个答案:

没有答案