0

I run a script on several CentOS machines that compiles Python 2.7.6 from source and installs it. I would now like to update the script so that it updates Python to 2.7.12, and don't really know how to tackle this.

Should I do this exactly the same way, just with source code of higher version, and it will overwrite the old Python version?

Should I first uninstall the old Python version? If so, then how?

Sorry if this is trivial - I tried Googleing and searching through Stack, but did not found anyone with a similar problem.

6
  • Scripts would be useful to see how you compile things and where you install things to Commented Oct 14, 2016 at 15:21
  • @SimonBlack basically this: digitalocean.com/community/tutorials/… Commented Oct 14, 2016 at 15:23
  • @pawel.ad why are you compiling python from source? Commented Oct 14, 2016 at 15:26
  • @pawel.ad certain CentOS builds do not make it easy to install a replacement - not always possible to find a yum package. Also there are some conflicts between a new python version and yum itself, it breaks it. I've experienced this horrible procedure in the past. Commented Oct 14, 2016 at 15:30
  • @postelrich because I need Python 2.7 on CentOS 6.8 Commented Oct 14, 2016 at 15:30

1 Answer 1

1

Replacing 2.7.6 with 2.7.12 would be fine using the procedure you linked. There should be no real problems with libraries installed with pip easy_install as the version updates are minor.

Worst comes to worst and there is a library conflict it would be because the python library used for compiling may be different and you can always reinstall the library which would recompile against the correct python library if required. This is only problematic if the library being installed is actually compiled against the python library. Pure python packages would not be affected.

If you were doing a major version change this would be okay as well as on CentOS you have to call python with python2.7 and not python, so a new version would call with python2.8

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.