Question

I have 3 versions of Python on my Linux VPS (CentOS). Version 2.6 is the system python. I want to install modules to python 2.7 but running the following command just installs to python 2.6. How do I specify python 2.7 in this command?

yum install python-devel

Thanks!

Was it helpful?

Solution

You can set the default version of python using the "alternatives" system. Try

>> /usr/sbin/alternatives --configure python

If this has no effect, try to find the python version in use and modify the symlinks accordingly

>> which python

If the result, for example, is /usr/local/bin/python and the version of python you want to use is at /usr/bin/python2.7 then do

>> ln -sf /usr/bin/python2.7 /usr/local/bin/python
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top