为什么我得到:使用解释器时,“”错误中找不到“ __main__”模块?

时间:2019-06-30 20:21:08

标签: python flask web-development-server

我正在学习烧瓶教程:https://www.tutorialspoint.com/flask/flask_templates.htm

我将以下代码复制并粘贴到python解释器/命令外壳中:

[user@localhost bin]$ /usr/bin/python -V
Python 2.7.15
[user@localhost bin]$ /usr/bin/python3 -V
Python 3.6.6
[user@localhost bin]$ python -V
Python 2.7.15

它给我以下消息:在

中找不到' main '模块

但是,当我将其保存到文件中并执行它时,它可以很好地工作。

0 个答案:

没有答案
相关问题