-
Install the build-essential package.
sudo apt install build-essential checkinstall
-
Install dependencies.
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev openssl
-
Get Python 3.5.0 source code, and configure and install Python.
-
Make $HOME/opt directory and change to this directory.
mkdir -p $HOME/opt cd $HOME/opt
-
Get the Python 3.5.0 source code.
curl -O https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
-
Unzip the downloaded Python package.
tar xzvf Python-3.5.0.tgz
-
Change to the directory where the package is unzipped.
cd Python-3.5.0
-
Configure the settings.
./configure --enable-shared --prefix=/usr/local LDFLAGS="-Wl,–rpath=/usr/local/lib"
-
Install the Python.
sudo make altinstall
-
Make $HOME/opt directory and change to this directory.