pythonshogun

Eigen/Dense not found with installation of Shogun


I'm currently trying to install Shogun a machine learning toolbox and to use it with Python. I'm facing a problem with the Eigen3 package, when I try sudo port install shogun it gives me this error (log file):

:info:configure Error: Eigen3 not found
...
:info:configure ./configure-11619-9060.cpp:1:10: fatal error: 'Eigen/Dense' file not found
:info:configure #include <Eigen/Dense>
:info:configure          ^

I've seen that some people say that changing to

#include "Eigen/Dense"

solve their problem, but I don't have access to this file, so I can't change it.

And if I type

$ ls /opt/local/include/eigen3/
Eigen                   unsupported
signature_of_eigen3_matrix_library

it gives me this, so I don't know what to try, any idea?

EDIT : I used this formula with these custom 2 lines

args = std_cmake_args + [
...    
"-DBUNDLE_EIGEN=ON",
"-DPythonModular=ON",
...
]

Now it does not report any error, but it does not recognize shogun

$ ipython
In [1]: import shogun
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-0add07018436> in <module>()
----> 1 import shogun

ImportError: No module named shogun

In [2]: import modshogun
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-0add07018436> in <module>()
----> 1 import modshogun

ImportError: No module named modshogun

Solution

  • You can add one of the following options to your cmake call to resolve this:

    Either get eigen in you include directory

        -DEIGEN_INCLUDE_DIR=/opt/local/include/eigen3/
    

    or you can use

       -DBUNDLE_EIGEN=ON
    

    to make shogun download the eigen3.