Python Forum

Full Version: pythy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there

How can i check if i installed the Django?

Thanks in advance
Hello,
go to terminal, run
pip list
and see if Django is there. If you have installed Django in a virtual environment of course make sure to activate the venv first.
I write the code snippet from tutorial:

from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'

and get the error:

line 1,
from flask import Flask
ModuleNotFoundError: No module named 'flask'

I have installed Flask and checked that it is there:

C:\Users\fpourki\PycharmProjects\Django_2\venv\Scripts\pip Flask


Package Version
------------ ----------------
click 6.7
coverage 4.5.1
Flask 1.0.2
itsdangerous 0.24
jinja2 2.10
...
...
...
...

Thanks in advance

F.Pourk
If I Have "Flask 1.0.2" why I get the error:

"No module named 'flask'"?
Quote:I have installed Flask and checked that it is there:

C:\Users\fpourki\PycharmProjects\Django_2\venv\Scripts\pip Flask

Can you check whether you are running your script from the virtual environment, and not base Python installation?