Can't install Django v3.1 on system with v1.11.29

I have Ubuntu with Django version 1.11.29. I want version 3.1 (or 3.1.1). I type:

pip install Django==3.1.

I get:

“Could not find a version that satisfies the requirement Django==3.1. (from versions: 1.1.3, 1.1.4,…”
Same results with versions 3.1, 3.1.1, 3.1.2…

Second attempt: I type: “python -m pip install Django”

I get:

Collecting Django
Using cached
Collecting pytz (from Django)
Using cached
Installing collected packages: pytz, Django
Successfully installed Django-1.11.29 pytz-2020.1

It’s the wrong version. How can I install Django 3.1.1?


First, verify that you’re using the Python 3 version of pip. Try pip3 install Django==3.1 or python3 -m pip install Django.

Depending upon which version of Ubuntu you’re running, it’s quite likely that Python 2 is the default. If so, in that case you’ll definitely want to work with a virtual environment. Set up a venv using Python 3, activate it, and work from there.


1 Like

It looks like you have a trailing . in your pip install command.