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.
-
1Read this: http://www.talino.org/tutorials/install-python-261-without-trashing-ubuntu/ – user225312 Nov 13 '10 at 17:09
4 Answers
Consider using Felix Krull's PPA which has pre-built Python 2.5 packages for Ubuntu.

- 11,010
- 4
- 41
- 39
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.

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

- 295,403
- 53
- 369
- 502
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.

- 27,952
- 4
- 66
- 85
-
Thanks. More details, I typed 'python' in console and saw the version is 2.5.5, I wanted to install oauth using easy_install but failed, it saied 'no module named zlib' – richie Nov 13 '10 at 17:29
-
zlib is a python module, so it's something with python itself that has been wrong. You probably have made a partial python install by trying to download and running configure & make commands. Not a good situation - you would probably need to clean that up first - see this post, might help: http://stackoverflow.com/questions/3544378/uninstall-python-built-from-source. If you are able to uninstall python2.5.5 properly (after that you must not get python2.5.5 when you run `python` and hopefully you should get python2.6), try the procedure in the links I posted. – icyrock.com Nov 13 '10 at 17:34
-
1Python would install zlib support automatically if it detects the zlib headers during `./configure`. Install the Ubuntu zlib-devel package and reinstall Python to get zlib support. – fideli Nov 13 '10 at 19:13