Last active
March 14, 2021 11:18
-
-
Save basaks/089f40e5ef52de0835f9b2b931eb74e0 to your computer and use it in GitHub Desktop.
Alternate python 3.7 installation on ubuntu 18.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Install Python3.7 interpreter on ubuntu 18.04 | |
[From here](http://devmartin.com/blog/2016/04/creating-a-virtual-environment-with-python3.4-on-ubuntu-16.04-xenial-xerus/), we can pretty much follow the exact same procedure. | |
Only this I needed to on top of that blog was the `libffi-dev` system dependency. | |
On a terminal just do the following steps: | |
Install dependencies: | |
sudo apt install build-essential checkinstall libreadline-gplv2-dev \ | |
libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ | |
libbz2-dev openssl libffi-dev | |
Download and untar the desired version: | |
mkdir -p $HOME/opt | |
cd $HOME/opt | |
curl -O https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz | |
tar -xzf Python-3.7.9.tgz | |
Install python3.7 while keeping python3.5 as the default python3 version on ubuntu 18.04. | |
cd Python-3.7.9/ | |
./configure --enable-shared --enable-optimizations --prefix=/usr/local LDFLAGS="-Wl,--rpath=/usr/local/lib" | |
sudo make altinstall | |
Check it was installed properly: | |
>> python3.7 -V | |
Python 3.7.9 | |
Enjoy! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment