No module named flask using virtualenv

前端 未结 12 1266
生来不讨喜
生来不讨喜 2020-12-29 22:42

I am following these steps to learn flask http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world/page/0#comments

I ran this command to create

12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-29 23:16

    If nothing else helps, check that in your code it is:

    from flask import Flask
    

    I've tried many things before I've noticed my mistake. I had this in my code:

    from Flask import Flask
    

    When I have changed capitalized letter for the module name, i.e. flask then everything worked.

提交回复
热议问题