Search code examples
pythoncmakepython-wheel

How to install a recent version of cmake on Centos5?


I am trying to generate python wheels of my python project, which depends on CMake >= 2.8.12. This has to be done on an old linux distro, CentOS5, for compatibility reasons (for details check manylinux). yum install cmake gives me: cmake version 2.6-patch 4, which is quite old.


Solution

  • Apparently there are cmake wheels available on PyPI. So simply run:

    pip install cmake
    

    and you will get the latest version available in the index.

    It is worth noting that the cmake binary is installed in its respective python bin directory. So if you run:

    /opt/python/cp35-cp35m/bin/pip install cmake
    

    the cmake binary will be installed in:

    /opt/python/cp35-cp35m/bin/cmake