Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install flask with pycharm and app engine

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 <module>
    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 **

like image 486
NGix Avatar asked Dec 05 '22 04:12

NGix


2 Answers

Windows Pycharm, you can go to File->Settings->Project interpreter, click the green + button (Install), type in flask, select Flask from the list then click Install Package. After installation, you will get the message saying flask installed successfully. You can rerun the project.

like image 124
Leung Ying Ying Avatar answered Dec 06 '22 19:12

Leung Ying Ying


Simply type the command pip install flask in your terminal

like image 32
Prateek Pareek Avatar answered Dec 06 '22 18:12

Prateek Pareek