Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My SLES11 box came with Python 2.6 installed. I would like to upgrade to 2.7. What is the easiest way to do this?

share|improve this question
up vote 1 down vote accepted

Most likely, you're not going to want to replace the existing python, since that would probably break the existing OS software.

You could either build a package for python 2.7, and have it install as /usr/bin/python2.7, or install in another location like /usr/local/bin/python. Or, you could just compile manually and install in /usr/local. If you're installing to an alternate location, use make altinstall.

share|improve this answer
I recommend a location like /opt/python-2.7 or /usr/local/stow/python-2.7. Don't put manually-installed programs in /usr (outside /usr/local), it will make the package management a lot less useful for no good reason. I recommend a separate location, not directly /usr/local/bin/python, so you can decide to switch to your python by adding e.g. /opt/python-2.7/bin to the front of your PATH. – Gilles Feb 18 '11 at 19:49
@Gilles: I agree. I'd only put files in /usr/bin if I were packaging them, and some people prefer to package things into /usr/local/bin (although it's not something I'd suggest). – jsbillings Feb 18 '11 at 22:27
where can i a get the binary package? – zr01 Feb 19 '11 at 6:18
zr01: The instructions I gave was for building it from source. I'm not aware of any third party repos that provide python 2.7 packages that are safe for OpenSUSE 11. – jsbillings Feb 19 '11 at 14:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.