nordvpn

How to install Python 3.8 on Ubuntu 19/18

In this tutorial, I will show you how to install Python 3.8 on Ubuntu 19

Read Also: How to install Python 3.7.0 on Mac

Install Python 3.8 on Ubuntu

1. Dependencies

There are some dependencies that we need to install before installing python 3.

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git

2. Install pyenv Ubuntu 19

First of all, let’s install pyenv on Ubuntu (https://github.com/pyenv/pyenv)

git clone https://github.com/pyenv/pyenv.git ~/.pyenv

Define environment variable

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile

3. Source Profile

Now lets source the profile

source ~/.profile

Consider reading: How to install Python 3.7 on Raspberry PI

4. Install Python 3.8

Now let’s install it using pyenv.

It will list all 3.8 versions. Let’s install 3.8-dev

$ pyenv install --list | grep 3.8
3.8.0
3.8.0b4
3.8.0rc1
3.8-dev
miniconda-3.8.3
miniconda3-3.8.3

Now install python 3.8 version

pyenv install 3.8.0

Now we have successfully installed python 3.8 version.

Please let me know how you like the tutorial.

Leave a Reply

Your email address will not be published.


*



The reCAPTCHA verification period has expired. Please reload the page.

48-Hour Flash Sale! Courses from just $10.99