osprey's diary

日々の雑感を書き綴ります

aptでpython3.6を入れてみる

前にCentOS7にyumでPython3.6を入れる記事を書いたけど、普段UbuntuDebian使うことのほうが多いのでメモ。

 

Ubuntu16.10とか17.04とか17.10はUniverse Repositoryに含まれてるそうです。

なので普通に

$ sudo apt update
$ sudo apt install python3.6

でOK。

16.04の場合はこんな感じ。

$ sudo add-apt-repository ppa:jonathonf/python-3.6
$ sudo apt update
$ sudo apt install python3.6

2017/9/22時点でPython3.6.2-1だった。

 

Debianの場合はこんな感じ。

# echo 'deb http://ftp.jp.debian.org/debian experimental main' >> /etc/apt/sources.list
# echo 'deb http://ftp.jp.debian.org/debian unstable main' >> /etc/apt/sources.list
# echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local
# apt update
# apt install python3.6

2017/9/22時点でPython3.6.3rc1-2だった。

 

以下のサイトにお世話になりました。感謝。

16.04 - How do I install Python 3.6 using apt-get? - Ask Ubuntu

debian - How to install Python 3.6? - Unix & Linux Stack Exchange