DEV Community

How to install Python 3.8 on Ubuntu?

edA‑qa mort‑ora‑y on June 16, 2019

I'm having no luck getting Python 3.8 running on (K)Ubuntu 18.04. I've got the main program installed, but it's lacking pip. I did: sudo add-ap...
Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

Digging through some closed issues I found you need to install python3.8-venv:

sudo apt-get install python3.8-venv
Enter fullscreen mode Exit fullscreen mode

Now this works:

python3.8 -m venv env
Enter fullscreen mode Exit fullscreen mode
Collapse
 
subsr97 profile image
Subramanian 😎

I'm sorry if this doesn't help. I thought of giving my two cents.

Try installing Anaconda. It's a superset of Python and comes with most commonly used packages by default. It uses a package manager called conda, which you can use for installing additional packages.
Installing Anaconda on Ubuntu 18.04

You might also find IPython really useful. It brings Jupyter notebook like features to the terminal.

Installing IPython

Collapse
 
nestedsoftware profile image
Nested Software

I think you may be missing this step: sudo apt-get install python3-pip (from vsupalov.com/developing-with-pytho...).

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

I have that installed, and that pip doesn't work correctly with python3.8. I needed the python3.8-venv to create a virtual environment, and then I could use pip within it.

Collapse
 
weakish profile image
Jang Rush

I encountered the same problem. Finally I use pyenv to install Python 3.8 on Ubuntu 18.04.