Compiling pytorch from source failed

Laurent1: <p>Hi,</p>
<p>Compiling PyTorch from source failed;<br>
Thanks for any help!</p>
<p>PyTorch Version (e.g., 1.0): master<br>
Box: OpenSuse 15.2<br>
How you installed PyTorch (conda, pip, source): source<br>
Build command you used (if compiling from source): python3 setup.py install<br>
following instructions <a href="https://github.com/pytorch/pytorch#from-source" rel="noopener nofollow ugc">here</a><br>
that is</p>
<p><code>git clone --recursive https://github.com/pytorch/pytorch cd pytorch git submodule sync git submodule update --init --recursive python3 setup.py install</code></p>
<p>Python version: 3.6.12<br>
CUDA/cuDNN version: 10.1</p>
<h2>`<br>
– The CXX compiler identification is GNU 7.5.0<br>
– The C compiler identification is GNU 7.5.0<br>
– Detecting CXX compiler ABI info<br>
– Detecting CXX compiler ABI info - done<br>
– Check for working CXX compiler: /usr/bin/c++ - skipped<br>
– Detecting CXX compile features<br>
– Detecting CXX compile features - done<br>
– Detecting C compiler ABI info<br>
– Detecting C compiler ABI info - done<br>
– Check for working C compiler: /usr/bin/cc - skipped<br>
– Detecting C compile features<br>
– Detecting C compile features - done<br>
– Not forcing any particular BLAS to be found<br>
– Performing Test COMPILER_WORKS<br>
– Performing Test COMPILER_WORKS - Success<br>
– Performing Test SUPPORT_GLIBCXX_USE_C99<br>
– Performing Test SUPPORT_GLIBCXX_USE_C99 - Success<br>
– Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED<br>
– Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED - Success<br>
– std::exception_ptr is supported.<br>
– Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING<br>
– Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING - Failed<br>
– Turning off deprecation warning due to glog.<br>
– Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS<br>
– Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS - Success<br>
– Current compiler supports avx2 extension. Will build perfkernels.<br>
– Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS<br>
– Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS - Success<br>
– Current compiler supports avx512f extension. Will build fbgemm.<br>
– Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY<br>
– Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Success<br>
– Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY<br>
– Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Success<br>
– Performing Test COMPILER_SUPPORTS_RDYNAMIC<br>
– Performing Test COMPILER_SUPPORTS_RDYNAMIC - Success<br>
– Building using own protobuf under third_party per request.<br>
– Use custom protobuf build.</h2>
<p>– 3.11.4.0<br>
– Looking for pthread.h<br>
– Looking for pthread.h - found<br>
– Performing Test CMAKE_HAVE_LIBC_PTHREAD<br>
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed<br>
– Check if compiler accepts -pthread<br>
– Check if compiler accepts -pthread - yes<br>
– Found Threads: TRUE<br>
– Performing Test protobuf_HAVE_BUILTIN_ATOMICS<br>
– Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success<br>
– Caffe2 protobuf include directory: $&lt;BUILD_INTERFACE:/home/laurent/Download/pytorch/third_party/protobuf/src&gt;$&lt;INSTALL_INTERFACE:include&gt;<br>
– Trying to find preferred BLAS backend of choice: MKL<br>
– MKL_THREADING = OMP<br>
– Looking for sys/types.h<br>
– Looking for sys/types.h - found<br>
– Looking for stdint.h<br>
– Looking for stdint.h - found<br>
– Looking for stddef.h<br>
– Looking for stddef.h - found<br>
– Check size of void*<br>
– Check size of void* - done<br>
– MKL_THREADING = OMP<br>
CMake Warning at cmake/Dependencies.cmake:150 (message):<br>
MKL could not be found.  Defaulting to Eigen<br>
Call Stack (most recent call first):<br>
CMakeLists.txt:533 (include)</p>
<p>CMake Warning at cmake/Dependencies.cmake:173 (message):<br>
Preferred BLAS (MKL) cannot be found, now searching for a general BLAS<br>
library<br>
Call Stack (most recent call first):<br>
CMakeLists.txt:533 (include)</p>
<p>– MKL_THREADING = OMP<br>
– Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_intel - mkl_intel_thread - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf_lp64 - mkl_intel_thread - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl_gf - mkl_intel_thread - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel - mkl_gnu_thread - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_intel - mkl_intel_thread - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf_lp64 - mkl_intel_thread - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf - mkl_gnu_thread - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl_gf - mkl_intel_thread - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - pthread - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - pthread - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel - mkl_gnu_thread - mkl_core - pthread - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - pthread - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf_lp64 - mkl_intel_thread - mkl_core - pthread - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf - mkl_gnu_thread - mkl_core - pthread - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl_gf - mkl_intel_thread - mkl_core - pthread - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl_intel_lp64 - mkl_sequential - mkl_core - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel - mkl_sequential - mkl_core - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_gf_lp64 - mkl_sequential - mkl_core - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf - mkl_sequential - mkl_core - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl_intel_lp64 - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_gf_lp64 - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf - mkl_core - gomp - pthread - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl_intel_lp64 - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_gf_lp64 - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf - mkl_core - iomp5 - pthread - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl_intel_lp64 - mkl_core - pthread - m - dl]<br>
–   Library mkl_intel_lp64: not found<br>
– Checking for [mkl_intel - mkl_core - pthread - m - dl]<br>
–   Library mkl_intel: not found<br>
– Checking for [mkl_gf_lp64 - mkl_core - pthread - m - dl]<br>
–   Library mkl_gf_lp64: not found<br>
– Checking for [mkl_gf - mkl_core - pthread - m - dl]<br>
–   Library mkl_gf: not found<br>
– Checking for [mkl - guide - pthread - m]<br>
–   Library mkl: not found<br>
– MKL library not found<br>
– Checking for [Accelerate]<br>
–   Library Accelerate: BLAS_Accelerate_LIBRARY-NOTFOUND<br>
– Checking for [vecLib]<br>
–   Library vecLib: BLAS_vecLib_LIBRARY-NOTFOUND<br>
– Found OpenBLAS libraries: /usr/lib64/libopenblas.so<br>
– Found OpenBLAS include: /usr/include<br>
– Performing Test BLAS_F2C_DOUBLE_WORKS<br>
– Performing Test BLAS_F2C_DOUBLE_WORKS - Failed<br>
– Performing Test BLAS_F2C_FLOAT_WORKS<br>
– Performing Test BLAS_F2C_FLOAT_WORKS - Success<br>
– Performing Test BLAS_USE_CBLAS_DOT<br>
– Performing Test BLAS_USE_CBLAS_DOT - Success<br>
– Found a library with BLAS API (open). Full path: (/usr/lib64/libopenblas.so)<br>
– The ASM compiler identification is GNU<br>
– Found assembler: /usr/bin/cc<br>
– Brace yourself, we are building NNPACK<br>
– Performing Test NNPACK_ARCH_IS_X86_32<br>
– Performing Test NNPACK_ARCH_IS_X86_32 - Failed<br>
– Found PythonInterp: /usr/bin/python3 (found version “3.6.12”)<br>
– NNPACK backend is x86-64<br>
CMake Deprecation Warning at third_party/googletest/CMakeLists.txt:1 (cmake_minimum_required):<br>
Compatibility with CMake &lt; 2.8.12 will be removed from a future version of<br>
CMake.</p>
<p>Update the VERSION argument  value or use a … suffix to tell<br>
CMake that the project does not need compatibility with older versions.</p>
<p>CMake Deprecation Warning at third_party/googletest/googlemock/CMakeLists.txt:42 (cmake_minimum_required):<br>
Compatibility with CMake &lt; 2.8.12 will be removed from a future version of<br>
CMake.</p>
<p>Update the VERSION argument  value or use a … suffix to tell<br>
CMake that the project does not need compatibility with older versions.</p>
<p>CMake Deprecation Warning at third_party/googletest/googletest/CMakeLists.txt:49 (cmake_minimum_required):<br>
Compatibility with CMake &lt; 2.8.12 will be removed from a future version of<br>
CMake.</p>
<p>Update the VERSION argument  value or use a … suffix to tell<br>
CMake that the project does not need compatibility with older versions.</p>
<p>– Failed to find LLVM FileCheck<br>
– Found Git: /usr/bin/git (found version “2.26.2”)<br>
– git Version: v1.4.0-505be96a<br>
– Version: 1.4.0<br>
– Performing Test HAVE_CXX_FLAG_STD_CXX11<br>
– Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success<br>
– Performing Test HAVE_CXX_FLAG_WALL<br>
– Performing Test HAVE_CXX_FLAG_WALL - Success<br>
– Performing Test HAVE_CXX_FLAG_WEXTRA<br>
– Performing Test HAVE_CXX_FLAG_WEXTRA - Success<br>
– Performing Test HAVE_CXX_FLAG_WSHADOW<br>
– Performing Test HAVE_CXX_FLAG_WSHADOW - Success<br>
– Performing Test HAVE_CXX_FLAG_WERROR<br>
– Performing Test HAVE_CXX_FLAG_WERROR - Success<br>
– Performing Test HAVE_CXX_FLAG_PEDANTIC<br>
– Performing Test HAVE_CXX_FLAG_PEDANTIC - Success<br>
– Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS<br>
– Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success<br>
– Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32<br>
– Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed<br>
– Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL<br>
– Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success<br>
– Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING<br>
– Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success<br>
– Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS<br>
– Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success<br>
– Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING<br>
– Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success<br>
– Performing Test HAVE_CXX_FLAG_WD654<br>
– Performing Test HAVE_CXX_FLAG_WD654 - Failed<br>
– Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY<br>
– Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed<br>
– Performing Test HAVE_CXX_FLAG_COVERAGE<br>
– Performing Test HAVE_CXX_FLAG_COVERAGE - Success<br>
– Performing Test HAVE_STD_REGEX<br>
– Performing Test HAVE_STD_REGEX<br>
– Performing Test HAVE_STD_REGEX – success<br>
– Performing Test HAVE_GNU_POSIX_REGEX<br>
– Performing Test HAVE_GNU_POSIX_REGEX<br>
– Performing Test HAVE_GNU_POSIX_REGEX – failed to compile<br>
– Performing Test HAVE_POSIX_REGEX<br>
– Performing Test HAVE_POSIX_REGEX<br>
– Performing Test HAVE_POSIX_REGEX – success<br>
– Performing Test HAVE_STEADY_CLOCK<br>
– Performing Test HAVE_STEADY_CLOCK<br>
– Performing Test HAVE_STEADY_CLOCK – success<br>
– Performing Test COMPILER_SUPPORTS_AVX512<br>
– Performing Test COMPILER_SUPPORTS_AVX512 - Success<br>
CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:424 (message):<br>
The package name passed to <code>find_package_handle_standard_args</code> (OpenMP_C)<br>
does not match the name of the calling package (OpenMP).  This can lead to<br>
problems in calling code that expects <code>find_package</code> result variables<br>
(e.g., <code>_FOUND</code>) to follow a certain pattern.<br>
Call Stack (most recent call first):<br>
cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)<br>
third_party/fbgemm/CMakeLists.txt:59 (find_package)<br>
This warning is for project developers.  Use -Wno-dev to suppress it.</p>
<p>– Found OpenMP_C: -fopenmp (found version “4.5”)<br>
CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:424 (message):<br>
The package name passed to <code>find_package_handle_standard_args</code> (OpenMP_CXX)<br>
does not match the name of the calling package (OpenMP).  This can lead to<br>
problems in calling code that expects <code>find_package</code> result variables<br>
(e.g., <code>_FOUND</code>) to follow a certain pattern.<br>
Call Stack (most recent call first):<br>
cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)<br>
third_party/fbgemm/CMakeLists.txt:59 (find_package)<br>
This warning is for project developers.  Use -Wno-dev to suppress it.</p>
<p>– Found OpenMP_CXX: -fopenmp (found version “4.5”)<br>
– Found OpenMP: TRUE (found version “4.5”)<br>
CMake Warning at third_party/fbgemm/CMakeLists.txt:61 (message):<br>
OpenMP found! OpenMP_C_INCLUDE_DIRS =</p>
<h1>CMake Warning at third_party/fbgemm/CMakeLists.txt:136 (message):</h1>
<p>CMake Warning at third_party/fbgemm/CMakeLists.txt:137 (message):<br>
CMAKE_BUILD_TYPE = Release</p>
<p>CMake Warning at third_party/fbgemm/CMakeLists.txt:138 (message):<br>
CMAKE_CXX_FLAGS_DEBUG is -g</p>
<p>CMake Warning at third_party/fbgemm/CMakeLists.txt:139 (message):<br>
CMAKE_CXX_FLAGS_RELEASE is -O3 -DNDEBUG</p>
<h1>CMake Warning at third_party/fbgemm/CMakeLists.txt:140 (message):</h1>
<p>– Performing Test __CxxFlag__fno_threadsafe_statics<br>
– Performing Test __CxxFlag__fno_threadsafe_statics - Success<br>
– Performing Test __CxxFlag__fno_semantic_interposition<br>
– Performing Test __CxxFlag__fno_semantic_interposition - Success<br>
– Performing Test __CxxFlag__fmerge_all_constants<br>
– Performing Test __CxxFlag__fmerge_all_constants - Success<br>
** AsmJit Summary **<br>
ASMJIT_DIR=/home/laurent/Download/pytorch/third_party/fbgemm/third_party/asmjit<br>
ASMJIT_TEST=FALSE<br>
ASMJIT_TARGET_TYPE=STATIC<br>
ASMJIT_DEPS=pthread;rt<br>
ASMJIT_LIBS=asmjit;pthread;rt<br>
ASMJIT_CFLAGS=-DASMJIT_STATIC<br>
ASMJIT_PRIVATE_CFLAGS=-Wall;-Wextra;-fno-math-errno;-fno-threadsafe-statics;-fno-semantic-interposition;-DASMJIT_STATIC<br>
ASMJIT_PRIVATE_CFLAGS_DBG=<br>
ASMJIT_PRIVATE_CFLAGS_REL=-O2;-fmerge-all-constants<br>
– Found Numa: /usr/include<br>
– Found Numa  (include: /usr/include, library: /usr/lib64/libnuma.so)<br>
– Using third party subdirectory Eigen.<br>
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.6.12”, minimum required is “3.0”)<br>
– Found PythonLibs: /usr/lib64/libpython3.6m.so.1.0 (Required is at least version “3.0”)<br>
CMake Error at cmake/Dependencies.cmake:942 (if):<br>
if given arguments:</p>
<pre><code>"VERSION_LESS" "3"
</code></pre>
<p>Unknown arguments specified<br>
Call Stack (most recent call first):<br>
CMakeLists.txt:533 (include)</p>
<p>– Configuring incomplete, errors occurred!<br>
See also “/home/laurent/Download/pytorch/build/CMakeFiles/CMakeOutput.log”.<br>
See also “/home/laurent/Download/pytorch/build/CMakeFiles/CMakeError.log”.<br>
Building wheel torch-1.8.0a0<br>
– Building version 1.8.0a0<br>
cmake -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/laurent/Download/pytorch/torch -DCMAKE_PREFIX_PATH=/usr -DJAVA_HOME=/usr/lib64/jvm/jre-11-openjdk -DNUMPY_INCLUDE_DIR=/usr/lib64/python3.6/site-packages/numpy/core/include -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib64/libpython3.6m.so.1.0 -DTORCH_BUILD_VERSION=1.8.0a0 -DUSE_NUMPY=True /home/laurent/Download/pytorch<br>
Traceback (most recent call last):<br>
File “setup.py”, line 773, in <br>
build_deps()<br>
File “setup.py”, line 320, in build_deps<br>
cmake=cmake)<br>
File “/home/laurent/Download/pytorch/tools/build_pytorch_libs.py”, line 55, in build_caffe2<br>
rerun_cmake)<br>
File “/home/laurent/Download/pytorch/tools/setup_helpers/cmake.py”, line 330, in generate<br>
self.run(args, env=my_env)<br>
File “/home/laurent/Download/pytorch/tools/setup_helpers/cmake.py”, line 141, in run<br>
check_call(command, cwd=self.build_dir, env=env)<br>
File “/usr/lib64/python3.6/subprocess.py”, line 311, in check_call<br>
raise CalledProcessError(retcode, cmd)<br>
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘-DBUILD_PYTHON=True’, ‘-DBUILD_TEST=True’, ‘-DCMAKE_BUILD_TYPE=Release’, ‘-DCMAKE_INSTALL_PREFIX=/home/laurent/Download/pytorch/torch’, ‘-DCMAKE_PREFIX_PATH=/usr’, ‘-DJAVA_HOME=/usr/lib64/jvm/jre-11-openjdk’, ‘-DNUMPY_INCLUDE_DIR=/usr/lib64/python3.6/site-packages/numpy/core/include’, ‘-DPYTHON_EXECUTABLE=/usr/bin/python3’, ‘-DPYTHON_INCLUDE_DIR=/usr/include/python3.6m’, ‘-DPYTHON_LIBRARY=/usr/lib64/libpython3.6m.so.1.0’, ‘-DTORCH_BUILD_VERSION=1.8.0a0’, ‘-DUSE_NUMPY=True’, ‘/home/laurent/Download/pytorch’]’ returned non-zero exit status 1.<br>
`</p>

dzhulgakov: <p>Ran into the same issue, you’re probably missing headers for libpython on your system, you can install them with something like <code>sudo yum install python3-devel.x86_64</code>.</p>
<p>Our CMake needs to be tweaked a bit, it seems that here the version string is empty despite PYTHONLIBS_FOUND being true: <a href="https://github.com/pytorch/pytorch/blob/db5e5b439c454d657cfa8f08a096cf68e203f2a8/cmake/Dependencies.cmake#L959" rel="noopener nofollow ugc">https://github.com/pytorch/pytorch/blob/db5e5b439c454d657cfa8f08a096cf68e203f2a8/cmake/Dependencies.cmake#L959</a></p>
<p>cc <a class="mention" href="/u/malfet">@malfet</a> FYI</p>

Laurent1: <p>Thanks for your help; I installed the required dev packages and it worked like a charm.<br>
The error message from CMake is just misleading here.</p>