Skip to content Skip to sidebar Skip to footer

How To Upgrade Django?

My project was running on Django 1.5.4 and I wanted to upgrade it. I did pip install -U -I django and now pip freeze shows Django 1.6.5 (clearly django has upgraded, I'm in virtual

Solution 1:

You can use --upgrade with the pip command to upgrade Python packages.

pip install --upgrade django==3.3.1

Solution 2:

I use this command for upgrading any package using pip:

pip install <package-name> --upgrade 

Example: pip install django --upgrade

you need to use the --upgrade or -U flag for upgrading.

Alternatively, you can use python -m pip install -U Django.

Solution 3:

  1. Use this command to get all available Django versions: yolk -V django
  2. Type pip install -U Django for latest version, or if you want to specify version then use pip install --upgrade django==1.6.5

NOTE: Make sure you test locally with the updated version of Django before updating production.

Solution 4:

You can use pip install -U django. It will update to the current stable version. Read official documentation on Django Docs

Solution 5:

with python 3.7 try:

sudo pip3 install --upgrade django==2.2.6

Because using the following:

pip3 install -U django

or with python 2.7 if you like to keep that old python:

pip install -U django

Only gives you the older version of django (1.11.xx instead of 2.2.6)

Post a Comment for "How To Upgrade Django?"