0

我目前正在尝试安装Shogun一个机器学习工具箱并将其与 Python 一起使用。我遇到了 Eigen3 包的问题,​​当我尝试时sudo port install shogun它给了我这个错误(日志文件):

: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          ^

我看到有人说改成

#include "Eigen/Dense"

解决他们的问题,但我无权访问此文件,因此无法更改。

如果我输入

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

它给了我这个,所以我不知道该尝试什么,知道吗?

编辑:我用这个公式和这些自定义的 2 行

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

现在它不报任何错误,但是它不识别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
4

1 回答 1

2

您可以在 cmake 调用中添加以下选项之一来解决此问题:

在包含目录中获取特征

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

或者你可以使用

   -DBUNDLE_EIGEN=ON

使幕府将军下载eigen3。

于 2015-12-21T08:42:09.477 回答