ubuntu-16.04eigen3caffe2

Error related to Eigen while installing Caffe2


I'm getting an error while installing Caffe2. After the succesful build, in the sudo make install step, it throws an error as #error Caffe2 requires Eigen to be at least 3.3.0


Solution

  • The solution is:

    1. Check the Eigen version with: cat /usr/include/eigen3/Eigen/src/Core/util/Macros.h | grep VERSION

    It will show some version variable values like below:

    EIGEN_WORLD_VERSION 3 EIGEN_MAJOR_VERSION 2 EIGEN_MINOR_VERSION 192

    These values are telling your problem directly. Your Eigen version is 3.2.192 instead of 3.3.0. So we need to upgrade this package.

    1. Install the latest version of eigen from http://eigen.tuxfamily.org/index.php?title=Main_Page .

    2. Extract the file wherever you want and rename it to eigen3.

    3. cd /usr/include

    4. sudo rm -rf eigen3/

    5. Place the file you just extracted withsudo mv path/of/eigen3 /usr/include/

    6. Lastly check the version again with cat /usr/include/eigen3/Eigen/src/Core/util/Macros.h | grep VERSION

    You should see these variables:

    EIGEN_WORLD_VERSION 3 EIGEN_MAJOR_VERSION 3 EIGEN_MINOR_VERSION 4

    You can run sudo make install again in the caffe2 directory and you will see that everything will be installed succesfully!