5

I'm using Ubuntu 11.10. The python 2.7.2 provided has a bug that has been corrected in the latest 2.7.2 sources from the python repository.

What is the recommended way to replace the ubuntu provided python with the python from source? Or put another way, how do I "update" the ubuntu-provided one? Ideally, I would just be able to create new .deb(s) that "update" the python2.7/python2.7-dev provided by Ubuntu.

UsAaR33
  • 756

1 Answers1

1

We apply some patches in Debian/Ubuntu's python, that make it behave a little differently to upstream Python. You can't replace your system python2.7 package with something else, without breaking all other python modules or applying these patches. (I'm particularly thinking of the distutils-install-layout patch).

The easiest answer is: don't.

Next option: Compile it by hand and install it in /usr/local. It won't replace your system python, but you'll be able to use it. This is the best supported way of achieving what you want.

Finally, if this really is something you want to do. Grab the current python2.7 source package, update it to use the new upstream version that you want to use (this will probably require massaging the patches a little). Build. Install. I'm intentionally not going into details here, because it's not going to be that simple :)

tumbleweed
  • 8,106