E: Unable to locate package setup.py code example

Example 1: E: Unable to locate package python3-pip

sudo add-apt-repository universe
sudo apt-get update

Example 2: e unable to locate package pyrit

sudo su
cd /etc/apt/
ls
nano source.list

You should be able to use any of the listed mirrors by adding a line to your /etc/apt/sources.list
like this : deb http://cz.archive.ubuntu.com/ubuntu bionic main universe
Replacing cz.archive.ubuntu.com/ubuntu with the mirror in question.

./source.list
sudo apt update 
sudo apt-get install pyrit