Install flask with pycharm and app engine

66 views
Skip to first unread message

Ir0nm via StackOverflow

unread,
Dec 4, 2014, 1:40:02 PM12/4/14
to google-appengin...@googlegroups.com

I'm using pycharm (4.0.1) on windows, I created a new app engine project, tested, project ran.

In project settings I added a virtual environment where I installed flask. Everything seems to be fine, interpreter points to my virtual environment and when I start typing in pycharm from flask import Flask it autocompletes import.

When I run project it's buildt with no errors. But when I access a page in a browser I get the following error:

File "C:\GAP\myproject\main.py", line 1, in from flask import Flask ImportError: No module named flask

Does anyone know what's the problem?

P.S. ** I followed instructions on https://www.youtube.com/watch?v=FRI3QGNWJYI **



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/27301420/install-flask-with-pycharm-and-app-engine

omair_77 via StackOverflow

unread,
Dec 5, 2014, 1:45:18 AM12/5/14
to google-appengin...@googlegroups.com

have you ran

pip install flask

also to use flask with google app engine on production environment , you will have to place the flask folder within your project (e.g in a lib folder) and add it to the system path in the appengine_config.py like this:

sys.path.insert(0, os.path.join(os.path.dirname(file), 'lib'))



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/27301420/install-flask-with-pycharm-and-app-engine/27310314#27310314
Reply all
Reply to author
Forward
0 new messages