在 rpi 上将 python 3.4 升级到 python 3.6

Upgrade python 3.4 to python 3.6 on rpi

如标题所述。我想将 raspberry pi 上的 python 版本从 3.4 升级到 3.6。

我试过了

sudo apt-get upgrade python3

但是没用:

Calculating upgrade... python3 is already the newest version

我也试过从python的网站上获取它。我有一个 zip 文件,但我该如何处理它?

抱歉新手问题

从源代码构建它(大约需要 40 分钟)

    $wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
    $tar -xf Python-3.6.5.tar.xz
    $cd Python-3.6.5
    $./configure
    $make -j4 #you have 4 cores on your cpu
    $sudo make install