如下一个flask项目的目录:
这个flask项目在python3.6环境下可以正常启动,但是在python2.7环境下如下报错提示:
提醒模块找不到。如下解决方法:
只需要在views目录里面加一个空的__init__.py文件。
执行结果如下:
结束!