Search on blog:

Nieoficjalne repozytorium wersji binarnych Pythona dla Ubuntu i Linux Mint

Nieoficjalne repozytorium wersji binarnych Pythona dla Ubuntu i Linux Mint

Python 2.7:

Python 2.7: deadsnakes-python2.7

sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
sudo apt-get update
sudo apt-get install python2.7

Python 3.5:

( to repozytorium zawiera wersje od 2.3 do 3.5 z pominięciem 2.7 )

Python 3.5: deadsnakes

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

tkinter jest instalowany osobno

sudo apt-get install python3.5-tk 

Podobnie IDLE

sudo apt-get install idle-python3.5

Po instalacji jest dostępne jako idle-python3.5 a nie jako idle3.5 (wzorem idle3.4)

Do instajacji innych modułów dostajemy pip3.5

Niektóre moduły przy instalacji wymagają pliku nagłówkowego Python.h, który znajduje się w Python-dev. Każda wersja Pythona ma własną wersję tego pliku.

sudo apt-get install python3.5-dev

Przykładem modułu, który wymaga Python.h jest lxml bo kompiluje on swój kod ze źródeł w C

sudo pip3.5 install lxml

Dodatkowe informacje

Źródło: Askubuntu - install-python-3-5-on-vivid-using-apt-get

Poniżej przykład zmiany linku python3 aby uruchamiał python3.5 ale ponieważ system może wykorzystywać python3 do uruchamiania własnych skryptów, które nie zawsze muszą chodzić pod python3.5 więc nie zaleca się robienia tej podmiany.

Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at

It will not overwrite your existing python3.4 which is still symlinked as python3. If you want python3.5 to be the default python3, change the symlink

cd /usr/bin
sudo rm python3
sudo ln -s python3.5 python3

Actually, DON'T change the symlink! There are apparently many system functions that don't work properly with python3.5. I tried this and afterwards couldn't open a terminal, software updater,...

The upgrade to Wily will adapt the meta-package python3 to point to python3.5. I don't expect any breakage, but at this point the foreign repository is not needed anymore. So to be really safe, you can purge the PPA before doing the upgrade.

If you like it
Buy a Coffee