fun*_*ure 38
费利克斯·克鲁尔也保持(如在未维护现在)PPA与最新的Python 2.7版本的Ubuntu精确,忠实的和乌托邦。您可以使用与 krondor 描述的相同的过程,但使用此 PPA: 代替或附加ppa:fkrull/deadsnakes-python2.7。
sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
sudo apt-get update
sudo apt-get install python2.7
Run Code Online (Sandbox Code Playgroud)
kro*_*dor 15
编辑: *正如@Anthon 在评论中指出的那样,此 PPA 不包括适用于 Ubuntu 12.04(精确)的 Python 2.7。见质朴,未来的答案下面,这时候我最初的反应,我不相信存在。
处理默认情况下未包含在其 Universe 中的包的首选“Ubuntu”方式是使用 PPA(第三方存储库),而不是手动编译。您可以通过这种方式保持包管理、更新和依赖项解析的好处。
但是,第三方存储库不受官方支持,如果这是您的要求的一部分。
DeadSnakes (get it) PPA 维护未包含在系统包管理中的 Python 版本。
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python2.7
Run Code Online (Sandbox Code Playgroud)
您可以在此处阅读有关此 PPA 的更多信息。
但是,在您的情况下,这不包括 Python 2.7,因为 DeadSnakes 仅提供未包含的主要版本,而不是点发布。由于 Ubuntu 已经为 Ubuntu 12.04 打包了 2.7,DeadSnakes 不会提供这个。
在这种情况下,您最好不要在 Ubuntu 中使用本机包装。请参阅 DeadSnakes 的摘录;
Using third-party modules packaged for Debian or Ubuntu with the Python
interpreters from this repository is a bit of a mixed bag. For Python 2, Python
modules from the official repositories will not work, as a consequence of how
Python packaging works in Debian. For Python 3 on the other hand, all
pure-Python module packages at least should be available; compiled extension
modules will not work however.
In general, you're better off installing Python modules using the common Python
packaging tools rather than the system package manager. For an introduction into
the Python packaging ecosystem and its tools, refer to;
http://guide.python-distribute.org/
A few of these tools might also be provided in this repository as a convenience.
Run Code Online (Sandbox Code Playgroud)
如果您绝对需要使用操作系统包管理,并且无法使用 DeadSnakes 或本机提供的包移动到不同版本的 Ubuntu,那么在我看来,您只剩下两个选项了。
旁注: AskUbuntu是一个更好的StackExchange来发布这样的东西,而不是一般的 SuperUser。
| 归档时间: |
|
| 查看次数: |
41573 次 |
| 最近记录: |