Set up Django with PostgreSQL, Nginx, and Gunicorn is covered here. And also mentioned that here Python3
is used.
First install the packages from the Ubuntu Repositories.
sudo apt update
sudo apt install python3-venv python3-dev libpq-dev postgresql postgresql-contrib nginx curl
Here several packages could be already installed.