【问题标题】:using python 2.6?使用python 2.6?
【发布时间】:2011-01-24 18:56:03
【问题描述】:

我无法升级到 python 2.7 或 3.1,所以我在我的 ubuntu 10.04 机器上使用 python 2.6。

我还能找到支持 python 2.6 的主机吗?

使用 python 2.6 是否仍然认为过时或不好的做法?

【问题讨论】:

  • 2.6 和 2.7大部分兼容 - 在 2.6 上运行的东西很可能在 2.7 上运行。
  • 你可以试试我的build recipe for squeeze

标签: python


【解决方案1】:

2.6 将持续很长时间。有很多机器甚至可以运行 2.4,所以你很好。

【讨论】:

    【解决方案2】:

    Python 2.6 可能还会出现一段时间,因为 Python 2.7 仅在几个月前发布。

    您始终可以使用 from __future__ import ... 来利用 Python 3.x 中的一些新功能

    【讨论】:

      【解决方案3】:

      我还能找到那个主机吗 支持python 2.6吗?

      是的。没有任何问题。

      正在使用 python 2.6 仍然考虑 过时或不好的做法?

      不,不是。

      但是:

      我无法升级到 python 2.7

      是的。您从 www.python.org 下载源代码并安装它。 在中你应该小心覆盖系统Python。

      使用“altinstall”安装它(不会覆盖系统 python)甚至更好, 使用自定义前缀。例如:

      $ ./configure --prefix = /opt/python27
      $ make
      $ sudo make install
      

      使用单独的 Python 安装进行开发通常是个好主意,因为您可以对它进行任何操作,包括删除和重新安装它,而不会影响系统 Python。

      你没有被卡住。 :)

      我也在使用 Ubuntu 10.04,我安装了 Python 2.3.7、2.4.6、2.5.5、2.6.6、2.7.1、3.0.1、3.1.2 和 3.2b2+。没问题。是的,我都用过,虽然主要是 2.4 和 2.6。

      【讨论】:

      • 您之前回答过这个问题,请问您如何选择要使用的版本?
      • @la_f0ka:您使用可以使用的最新版本。只有您知道可以使用哪些版本。
      【解决方案4】:

      Python3.1 在 10.04 的存储库中

      $ apt-cache show python3
      Package: python3
      Priority: optional
      Section: python
      Installed-Size: 76
      Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
      Original-Maintainer: Matthias Klose <doko@debian.org>
      Architecture: all
      Source: python3-defaults
      Version: 3.1.2-0ubuntu1
      Depends: python3.1 (>= 3.1.2), python3-minimal (= 3.1.2-0ubuntu1)
      Suggests: python3-doc (>= 3.1.2-0ubuntu1), python3-tk (>= 3.1.2-0ubuntu1), python3-profiler (>= 3.1.2-0ubuntu1)
      Filename: pool/main/p/python3-defaults/python3_3.1.2-0ubuntu1_all.deb
      Size: 11096
      MD5sum: 81f3f3bf790f5d7756b76c8d92fcea86
      SHA1: 32e12dc7f9500456e063f22645c1cfed76b8845c
      SHA256: 0f541352ace2fcf1929a93320ffbe2f1de4e1d140bbe70a7c5a709403b73341c
      Description: An interactive high-level object-oriented language (default python3 version)
       Python, the high-level, interactive object oriented language,
       includes an extensive class library with lots of goodies for
       network programming, system administration, sounds and graphics.
       .
       This package is a dependency package, which depends on Debian's default
       Python version (currently v3.1).
      Bugs: https://bugs.launchpad.net/ubuntu/+filebug
      Origin: Ubuntu
      Supported: 3y
      

      【讨论】:

        猜你喜欢
        • 2015-05-17
        • 1970-01-01
        • 2013-05-17
        • 2012-02-09
        • 2010-12-16
        • 1970-01-01
        • 1970-01-01
        • 2011-07-02
        • 1970-01-01
        相关资源
        最近更新 更多