欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Pycharm配置Flask无法启动,报No module named flask.__main__; ‘flask‘ is a package and cannot be direct

程序员文章站 2022-07-14 21:14:59
...

报No module named flask.main; ‘flask’ is a package and cannot be direct错误


配置详情:

右下角显示版本过低

Pycharm配置Flask无法启动,报No module named flask.__main__; ‘flask‘ is a package and cannot be direct


点击启动后的报错信息:

Pycharm配置Flask无法启动,报No module named flask.__main__; ‘flask‘ is a package and cannot be direct

尝试更新flask:

Pycharm配置Flask无法启动,报No module named flask.__main__; ‘flask‘ is a package and cannot be direct

输入:pip3 install --upgrade Flask

Pycharm配置Flask无法启动,报No module named flask.__main__; ‘flask‘ is a package and cannot be direct
的确是flask版本过低

再次运行Flask

Pycharm配置Flask无法启动,报No module named flask.__main__; ‘flask‘ is a package and cannot be direct


flask已正常启动:
Pycharm配置Flask无法启动,报No module named flask.__main__; ‘flask‘ is a package and cannot be direct


相关标签: python flask