4

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?

1

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.

  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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