Skip to main content

Debian 8, Python3.5 and pip3.5

A mini tutorial on this kind of setup, since Debian 8 currently comes with Python3.4.

In order to manage to compile and install pip3.5 along with the Python3.5, from source, you must install some other stuff first. For pip3.5 specifically, you need libssl-dev.
Overall, you need to install all the following packages.

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;

After that, you can compile Python3.5 from source and all will be good.
Extract the tar and run the following commands in the created directory:

./configure; make; make test; sudo make install;

This will install Python3.5 at "/usr/local/bin/python3.5" and will make it your default Python interpreter.
It will also install pip3.5 at "/usr/local/bin/pip3.5".

You can always create bash aliases in your ".bash_aliases" file to manipulate which python or pip you will be calling in your terminal.
For example:

alias python='python3.5' alias pip='pip3.5'