Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJonnatan Gutierrez
3,168 Pointsimport flask not working CMD windows
Hi,
I am trying to run the import flask but I got an error
I followed all the steps to have it installed on my PC but is not working, any ideas?
Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import flask ImportError: No module named 'flask'
1 Answer
evgenypanov
1,521 PointsIf you are using virtualenv and flask was installed in venv dir, you need run python from your venv directory.
example: Now you are in venv dir: bin/python my_flask_app.py
if you are run "python my_flask_app.py", in this case you are using system python and don't have installed flask.