Installing Django on Ubuntu Desktop 22.04 LTS

First run sudo apt update and sudo apt upgrade to get all packages and versions up to the latest, including most importantly python.

You can check what version of python you are running with: python – -version or python3 – -version

Install python3-pip: sudo apt install python3-pip

Once that is installed, install pipenv: pip3 install pipenv

You may receive a note that pipenv is not in your path, so update your .bashrc file in your home directory and add this to the end:

export PATH=”/home/<username>/.local/bin:$PATH”

Close and re-open your terminal.

You should now be ready to create a directory for your django and activate the virtual environment in that folder by running: pipenv shell

You can now install django: pipenv install django