I recently attempted to upgrade our Python install on a CentOS server from 2.4.3 to 2.7, however it lists 2.4.3 as the newest stable release. This is a problem because I have a Python program that requires at least 2.7 to run properly. After contacting support they installed Python 2.7 in a separate directory, however I’m not sure how to access this version. Anytime I try to run the python program it uses the 2.4.3 version. I have looked into changing the PythonHome variable, but can’t get it to work correctly. Is there anything I can do via the command line or inside the program itself to specify which Python version I want to use?
Share
Try specifying the full path to the python executable (i.e.
/opt/python27/python) rather than using a barepythoncommand. Alternatively, place/opt/python27/on yourPATHearlier than/usr/local/bin(where thepythoncommand is presumably already present, you can check withwhich python).