I'm trying to install pip
for Python 3.8
on an Ubuntu 18.04 LTS
.
I know this has been asked way too many times. But those questions do not concern keeping Ubuntu's defaults specifically. And the answers on those questions either don't work or go on to suggest something so drastic that it would break the system - e.g. change default
python3
version from3.6
to3.8
. You SHOULDN'T!
So far, I've been able to install python3.8
successfully using the PPA
- ppa:deadsnakes/ppa
:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8
Changed python
command from python2
to python3.8
using update-alternatives
:
update-alternatives --remove python /usr/bin/python2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 10
Now, I get python 3.8
when I run python --version
:
Python 3.8.5
The problem is, I still can't install pip
for Python 3.8
.
If I try to install python3-pip
, it installs pip
for Python 3.6
since python3
still points to python3.6.9
, and I intend to keep it that way.
Try installing python-pip
, and it will install pip
for Python 2.7
.
Also there's no such package as python3.8-pip
, so I can't install it like:
sudo apt install python3.8-pip
Output:
E: Unable to locate package python3.8-pip
E: Couldn't find any package by glob 'python3.8-pip'
E: Couldn't find any package by regex 'python3.8-pip'
What can I do to install pip
for Python 3.8
on an Ubuntu 18.04?