Ubuntu 18 Install Python 3.7

Installing python 3.7 from source on Ubuntu 18 or Debian 9 with alternative install

Installing Required Dependency

$ sudo apt-get update
$ sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl libbz2-dev

Download python source from https://www.python.org/downloads/source/ and in this scenarion im using python 3.7.8 from https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tar.xz

mkdir /opt/tmp
cd /opt/tmp
curl -O https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tar.xz
tar -xf Python-3.7.8.tar.xz
cd Python-3.7.8
./configure --enable-optimizations

For make install, you can calculate your server CPU/vCPU, in this scenarion im using cloud with 16 GB RAM and 8 vCPU

make -j 8
sudo make altinstall

Test your python installation with check version: python3.7 –version

SOURCE:

https://linuxize.com/post/how-to-install-python-3-7-on-debian-9/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.