致命错误:eigen3 / Eigen / Core:没有这样的文件或目录

问题描述 投票:0回答:1

我不了解C ++,但我正在尝试运行此project,它表示通过运行命令pip install CRF/创建包装器。我正在尝试做同样的事情,但是我遇到了这个错误。

    ERROR: Command errored out with exit status 1:
   command: /home/ssindhu/deeplab_env/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-pmpk49o5/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-pmpk49o5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ytpsnw2f --python-tag cp36
       cwd: /tmp/pip-req-build-pmpk49o5/
  Complete output (30 lines):
  Warning: Extension name 'krahenbuhl2013/wrapper' does not match fully qualified name 'krahenbuhl2013.wrapper' of 'krahenbuhl2013/wrapper.pyx'
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/krahenbuhl2013
  copying krahenbuhl2013/__init__.py -> build/lib.linux-x86_64-3.6/krahenbuhl2013
  copying krahenbuhl2013/CRF.py -> build/lib.linux-x86_64-3.6/krahenbuhl2013
  running build_ext
  building 'krahenbuhl2013/wrapper' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/krahenbuhl2013
  creating build/temp.linux-x86_64-3.6/src
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/ssindhu/deeplab_env/lib64/python3.6/site-packages/numpy/core/include -Iinclude -I/usr/include/eigen3 -I/usr/include/python3.6m -c krahenbuhl2013/wrapper.cpp -o build/temp.linux-x86_64-3.6/krahenbuhl2013/wrapper.o
  In file included from /home/ssindhu/deeplab_env/lib64/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830:0,
                   from /home/ssindhu/deeplab_env/lib64/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /home/ssindhu/deeplab_env/lib64/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from krahenbuhl2013/wrapper.cpp:438:
  /home/ssindhu/deeplab_env/lib64/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^
  In file included from krahenbuhl2013/../include/densecrf.h:29:0,
                   from krahenbuhl2013/../include/densecrf_wrapper.h:1,
                   from krahenbuhl2013/wrapper.cpp:440:
  krahenbuhl2013/../include/unary.h:28:29: fatal error: eigen3/Eigen/Core: No such file or directory
   #include <eigen3/Eigen/Core>
                               ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for CRF

[最初是#include <Eigen/Core>,但我遵循了discussion,然后将其更改为eigen3/Eigen/Core。但是在两种情况下我都遇到相同的错误。作为一个非常了解c ++的人,我应该怎么做才能解决此错误。

c++ python-3.x cython eigen eigen3
1个回答
0
投票

您显然需要安装Eigen(在许多Linux上为libeigen3-dev-或手动下载它。

此外,

#include <eigen3/Eigen/Core>

而不是

#include <Eigen/Core>

不推荐。您应该将正确的包含路径传递给编译器。在许多常见的Linux发行版中,使用clang / gcc都是-I/usr/include/eigen3(您似乎已经知道了)。

如果您手动下载了Eigen,则需要将该路径调整为具有(提取的)Eigen目录的位置。

© www.soinside.com 2019 - 2024. All rights reserved.