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
The solution is:
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.
Install the latest version of eigen from http://eigen.tuxfamily.org/index.php?title=Main_Page .
Extract the file wherever you want and rename it to eigen3
.
cd /usr/include
sudo rm -rf eigen3/
Place the file you just extracted withsudo mv path/of/eigen3 /usr/include/
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!