升级Python
根据官方Python网站 ,Python 2的当前版本是2.7.10
。
在我的电脑上,我有2.7.6
:
$ python Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> exit()
我想我会使用apt-get
更新到2.7.10
。 但是,这不起作用:
$ sudo apt-get install python2.7 Reading package lists... Done Building dependency tree Reading state information... Done python2.7 is already the newest version.
apt-get
告诉我,我已经有了最新版本。
是什么赋予了?
与其他应用程序(如firefox
或chromium-browser
一样,在Ubuntu中不会不断更新python包。 这并不是说该软件包不会获得安全更新; 但我想如果14.04 LTS仍然运行2.7.6 vs 2.7.10可能没有任何重大安全问题。
如果你运行apt-cache showpkg python2.7
或apt-get changelog python2.7
你可以获得更多信息。
基本上,你需要源安装python(这很简单)。 我也找到了以下PPA: ppa:fkrull/deadsnakes
但我无法保证。