How Should I install Django on Ubuntu 20.04 LTS

507 views Asked by At

I am trying to install Djnago on ubuntu 20.04 LTS. First of all, I used the following command to install Python:

sudo apt-get install python3

Python version is 3.8.2.

Then I used these commands to install Django, 1st step: sudo apt update 2nd step: sudo apt install python3-pip

Error is showed in 2nd step and that is,

Media change: please insert the disc labeled
 'Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)'
in the drive '/cdrom/' and press [Enter]

When I press Enter. It continuously showed but it doesn't solve the problem

Now, what should I do? Please, help me solving this problem.

2

There are 2 answers

2
VicenteC On

Since Python is already installed on Ubuntu 20.04, you should try:

pip install Django==3.1.1

Here is the documentation about how to install Django on different OS. Django Documentation

3
N Suraj Kumar On
sudo apt-get update
python -m pip install Django
  • This will download the latest version of Django for you.
  • By using the version name you can get specific version.
  • But by doing this you will get the latest stable version