installation of Django

83 views
Skip to first unread message

mohamed farhan

unread,
Dec 15, 2021, 7:02:11 PM12/15/21
to Django users
hello my dear friends
just would like to know how to install Django using pip install Django==4.0 well this code wasn't working for me and being the first time user  of both python and Django, feeling bit confused so could u guys help me out.

Lhuis Felippe Robles

unread,
Dec 18, 2021, 9:34:01 AM12/18/21
to Django users
Hello eveyone!!, I'm also new to Django, hoping that this also helps Hacke, I'll describe the steps I did in order to install Django in my 64bit windows laptop.

1. I had already python in my computer but I had to update to Python 3.7.4 as well as get the latest version of 'pip' in order to download Django 4.0
In case you don't have pip yet installed, you can use this command:  
                                                                                                                          >>> curl https://bootstrap.pypa.io/get-pip.py  |  python


2. I cloned the github repository of django in my directory "Program Files" of my computer, and then  installed it with 'pip', I'm but not sure if that is the best directory for this framework, or if it's not relevant, because I have problems when I run python and try to check if Django's been already installed by using 

>>> import django
>>> print(django.get_version()) 4.0

Because it tells me that django has no 'get_version' attribute.

3. I have been able to create a venv in a different directory, activate it , and install django in ti using pip
but every time I run $ python -m django --version, it shows
"No module named django.__main__; 'django' is a package and cannot be directly executed"
I wonder if it is because django is not in the path of python, or if I should clone the repository in another directory, or if I should set up PostgreSQL first; please help!!
Reply all
Reply to author
Forward
0 new messages