Creating and activating a venv fixes this.
python -m venv venv source venv/bin/activate
You can check if this was fixed with:
which python which pip
This should return the path to venv python and pip.