Compile specifying the cmake version

Hi there,

I’m trying to compile the PyTorch framework on a server that has two version of cmake. By default, setuptools uses the version 2.8.* but you support only the cmake version 3.0 or higher. On this machine, there is a cmake3 executable but I don’t know how can I switch them before starting the compilation. Do you have any ideas?

Thank you in advance!

You can do:

CMAKE_VERSION=cmake3 python setup.py installl
2 Likes

could you pls answer more detail , if I have cmake3.12 in my home path ,like /home/somebody/install_cmak/bin/cmake_3.12 ,otherwise , cmake_2.8 is preserved by system .

how can I use specific cmake path in python setup.py ?

CMAKE_ROOT=/home/somebody/install_cmak/ CMAKE_VERSION=cmake3 python setup.py installl

it’s not right ,I had tested.

Update PATH with the path for the directory where cmake3 is installed.

great ! it’s working

export PATH=$PATH:/home/somebody/install_cmak/bin/

for linux_centos_7, it’s priority execute order is from front to end ,so the below code is right

export PATH=/home/somebody/install_cmak/bin/:$PATH

was inspired by @Deepali ,thank you very much