Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pythy
#1
Hi there

How can i check if i installed the Django?

Thanks in advance
Reply
#2
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.
Reply
#3
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
Reply
#4
If I Have "Flask 1.0.2" why I get the error:

"No module named 'flask'"?
Reply
#5
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?
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020