【问题标题】:In Linux, how do I compile and install code for different versions of Python?在 Linux 中,如何为不同版本的 Python 编译和安装代码?
【发布时间】:2011-04-06 19:50:28
【问题描述】:

查看问题的标题。特别是在 Linux 中,如何为不同版本的 Python 编译和安装 PyGTK 2.24?

在使用“configure, make, make install”或“setup.py”时是否必须指定选项和路径?

【问题讨论】:

  • pygtk 是否适用于您的 python 版本?
  • 自述文件说“Python 2.3.5 或更高版本”,而我的版本更高。

标签: python linux installation pygtk compilation


【解决方案1】:
#python2.6 setup.py

#python2.5 setup.py

会有所作为

编辑:对于 PyGTK,请refer to this FAQ

【讨论】:

  • 使用 setup.py 时,我收到以下消息:Building PyGTK using distutils is only supported on windows。要以受支持的方式构建 PyGTK,请阅读 INSTALL 文件。我的大部分 Python 版本可能都是从源代码编译的。
  • 您阅读过INSTALL 文件吗?通常他们有一些很好的信息(说真的)。
  • @Winston:在我的回答中添加了与 PyGTK 相关的信息,希望对您有所帮助。
最近更新 更多