Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5944

How do I install pip for Python 3.8 on Ubuntu without changing any defaults?

$
0
0

I'm trying to install pip for Python 3.8 on an Ubuntu 18.04 LTS. Previous 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 from 3.6 to 3.8, which you shouldn't.

So far, I've been able to install python3.8 successfully using ppa:deadsnakes/ppa:

sudo add-apt-repository ppa:deadsnakes/ppasudo apt updatesudo apt install python3.8

I changed the python command from Python 2 to Python 3.8 using update-alternatives:

update-alternatives --remove python /usr/bin/python2sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 10

Now when I run python --version I get:

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.

  • 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 <br>E: Couldn't find any package by glob 'python3.8-pip'<br>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?


Viewing all articles
Browse latest Browse all 5944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>