Installation error from source

Hi Guys,

I am trying to install pytorch from source because of this (glibc version) issue

Below are the commands I used :
$export CMAKE_PREFIX_PATH=/home/jamess/anaconda2/ [#anaconda path]
$conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
$conda install -c mingfeima mkldnn
$git clone --recursive
cd pytorch
$python install

System info :
OS : CentOS release 6.7

I get the following error :


    – Need to define long as a separate typeid.
    – std::exception_ptr is NOT supported.
    – NUMA is not available
    – Turning off deprecation warning due to glog.
    – Building using own protobuf under third_party per request.
    – Use custom protobuf build.
    – Caffe2 protobuf include directory: $<BUILD_INTERFACE:/home/jamess/Downloads/pytorch/third_party/protobuf/src>$<INSTALL_INTERFACE:include>
    – The BLAS backend of choice:MKL
    – Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
    – Library mkl_intel_lp64: /home/jamess/anaconda2/lib/
    – Library mkl_gnu_thread: /home/jamess/anaconda2/lib/
    – Library mkl_core: /home/jamess/anaconda2/lib/
    – Library gomp: -fopenmp
    – Library pthread: /usr/lib64/
    – Library m: /usr/lib64/
    – Library dl: /usr/lib64/
    – Brace yourself, we are building NNPACK
    CMake Warning at cmake/Dependencies.cmake:310 (find_package):
    By not providing “FindEigen3.cmake” in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by “Eigen3”, but
    CMake did not find one.

    Could not find a package configuration file provided by “Eigen3” with any
    of the following names:


    Add the installation prefix of “Eigen3” to CMAKE_PREFIX_PATH or set
    “Eigen3_DIR” to a directory containing one of the above files. If “Eigen3”
    provides a separate development package or SDK, be sure it has been
    Call Stack (most recent call first):
    CMakeLists.txt:181 (include)

– Did not find system Eigen. Using third party subdirectory.
– Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR)
CMake Error at cmake/Dependencies.cmake:803 (message):
The C++ compiler does not support required functions. This is very likely
due to a known bug in GCC 5 (and maybe other versions) on Ubuntu 17.10 and
newer. For more information, see:
Call Stack (most recent call first):
CMakeLists.txt:181 (include)

– Configuring incomplete, errors occurred!
See also “/home/jamess/Downloads/pytorch/build/CMakeFiles/CMakeOutput.log”.
See also “/home/jamess/Downloads/pytorch/build/CMakeFiles/CMakeError.log”.
Failed to run ‘bash tools/ --use-nnpack --use-mkldnn caffe2 nanopb libshm gloo THD’


Any suggestions ?

In the issue, this link seems to help building PyTorch with your GCC.
Could you check it?

Unfortunately, I don’t have the root access to the system, so can’t edit the files.

1 Like