Installing python 3.5 via apt-get

Installing python 3.5 via apt-get

UPDATE

Thanks to Don Kirkby who highlight that there is a new recommended PPA.
The updated one is ppa:deadsnakes/ppa, so the complete command is the following:

sudo add-apt-repository ppa:deadsnakes/ppa


If you are using Ubuntu, you can install it adding a PPA; so you can proceed in this way:

sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.5

If this procedure doesnt work, is possible that your Ubuntu version not supported it. So i think that you can install in this way:

sudo apt-get install libssl-dev openssl
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar xzvf Python-3.5.0.tgz
cd Python-3.5.0
./configure
make
sudo make install

Install dependencies:

sudo apt-get build-dep python3.2
sudo apt-get install libreadline-dev libncurses5-dev libssl1.0.0 tk8.5-dev zlib1g-dev liblzma-dev

Download Python 3.3.0:

wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz

Extract:

tar xvfz Python-3.3.0.tgz
Configure and Install:
cd Python-3.3.0
./configure --prefix=/opt/python3.3
make  
sudo make install

Test if it worked:

/opt/python3.3/bin/python3

Installing python 3.5 via apt-get

try with a simple search first:

apt-cache search python | grep 3.5

Leave a Reply

Your email address will not be published. Required fields are marked *