如何在 Ubuntu10.10 中安装 python2.5.5 并捆绑所有库

发布于 2024-10-02 10:59:07 字数 237 浏览 4 评论 0原文

我想在Ubuntu10.10中安装python2.5.5,因为Ubuntu10.10现在只支持python>=2.6,所以我从python网站下载源文件并尝试安装它 ./配置&&制作&& sudo make install,看来python2.5.5已经安装成功了,但是当我要使用它的时候,有时会说“no module named ...”,但是应该是捆绑的,我在我的Win7中使用过它,所以我想知道是否可以安装所有库。

I want to install python2.5.5 in Ubuntu10.10, since Ubuntu10.10 now just supports python>=2.6, so I download source file from python website and try to install it use
./configure && make && sudo make install, it seems that python2.5.5 has been installed successfully, but when I want to use it, sometimes it says "no module named ...", but it should be bundled, I have used it in my Win7, so I wonder whether I can install all the libs.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

云朵有点甜 2024-10-09 10:59:07

考虑使用 Felix Krull 的 PPA,它为 Ubuntu 预先构建了 Python 2.5 软件包。

Consider using Felix Krull's PPA which has pre-built Python 2.5 packages for Ubuntu.

满身野味 2024-10-09 10:59:07

您可能缺少一些默认情况下未在 Ubuntu 上与 Python 捆绑在一起的库(我不知道为什么他们决定以这种方式拆分“核心”python)。

您可以尝试运行 apt-get build-dep python python-dev 并再次构建(您可能还需要添加其他包)。

经验法则是,如果 Python 抱怨没有 sqlite3 模块,则需要安装 libsqlite3-dev,然后重建。

You probably missing some libraries that are not bundled by default on Ubuntu with Python (I have no idea why they decided to split "core" python this way).

You can try running apt-get build-dep python python-dev and build again (you might need to add other packages as well).

Rule of thumb is that if Python complains about not having sqlite3 module, you need to install libsqlite3-dev, then rebuild.

温柔少女心 2024-10-09 10:59:07

您可以将 10.04 添加到您的 apt 源中,然后您可以在 apt-update 后以通常的方式安装

You can add 10.04 to your apt sources, then you can install in the usual way after an apt-update

ㄖ落Θ余辉 2024-10-09 10:59:07

以下帖子可能会有所帮助:

不知道您缺少哪个库,但您可能可以使用 easy_install 安装它:

您必须将 python2.5 设置为默认 python,方法是将其放在 PATH 中的 python2.6 前面。请注意,这必须位于 sudo 级别,因为您需要 sudo easy_install。也就是说,在尝试安装 easy_install 之前,sudo python 应运行 Python 2.5。这有点混乱,但在此之后您应该可以正常启动并运行了。

Here's the post that might help:

Don't know which library you are missing, but you would probably be able to install it with easy_install:

You would have to set up python2.5 as the default python by putting it in front of python2.6 in the PATH. Note that this has to be on the sudo level, as you would need to sudo easy_install. That is, sudo python should run Python 2.5 before you try to install easy_install. It's a bit messy, but after this you should have all up and running properly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文