I am trying to install llvm on my centos 6.7. While running the configure file it says it throws the error

checking for python >= 2.7... not found configure: error: found python 2.6.6 (/usr/bin/python); required >= 2.7 See `config.log' for more details.

So I installed python 2.7, but since the previous python version is already in there the configure shows the same error. I tried aliasing python with the new python version using

alias python=/usr/local/bin/python2.7

This made python2.7 to be executed while calling python. But the error while running the configure file is still there. How can I resolve this.

  • 2
    llvm (i.e.. clang and friends) are available in EPEL. No need to compile by hand. – vonbrand Jan 9 '16 at 21:45
  • How did you install the new python? (Yum will often remove the old package, but if you used rpm it might have left the old package around to cause your issues). Also, as @vonbrand said, you should just be able to use your package manager to do the install. – darklion Jan 10 '16 at 4:02
  • @darklion build python from the source. yum wont install python to the latest version – Rakesh R Nair Jan 10 '16 at 9:24
  • Download a more recent version of Python and then change your Path or PythonPath to point to that. – gardenhead Jan 11 '16 at 17:57

If you want Python 2.7 on a CentOS6 system, install the Python 2.7 Software Collection package. It will not replace /usr/bin/python, but if you load the python27 scl, configure will detect it.

Note: you should just use the EPEL package for llvm if that's all you want.


First remove the symbolic link of existing python using

sudo rm -r /usr/bin/python

Then create a new link to python for python-2.7

sudo ln -s /usr/local/bin/python2.7 /usr/bin/python

  • 1
    This will break your CentOS system. If you replace /usr/bin/python with something you built in /usr/local, your system will never be able to run 'yum' and you will cease to get any software updates and security fixes. – jsbillings Jan 11 '16 at 15:30

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.