lucasb-eyer / pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.
MIT License
1.96k stars 417 forks source link

Unable to build under python3.7 with error pydensecrf/eigen.cpp:17032:21: error: no member named 'exc_type' in '_ts' #99

Open DeriZSY opened 5 years ago

DeriZSY commented 5 years ago

Running pip install pydensecrf under python3.7 produces the following information:

pydensecrf/eigen.cpp:17032:21: error: no member named 'exc_type' in '_ts'
    *type = tstate->exc_type;
            ~~~~~~  ^
pydensecrf/eigen.cpp:17033:22: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
    *value = tstate->exc_value;
                     ^~~~~~~~~
                     curexc_value
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
pydensecrf/eigen.cpp:17034:19: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
    *tb = tstate->exc_traceback;
                  ^~~~~~~~~~~~~
                  curexc_traceback
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
pydensecrf/eigen.cpp:17041:24: error: no member named 'exc_type' in '_ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
pydensecrf/eigen.cpp:17042:25: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
pydensecrf/eigen.cpp:17043:22: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
    tmp_tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
pydensecrf/eigen.cpp:17044:13: error: no member named 'exc_type' in '_ts'
    tstate->exc_type = type;
    ~~~~~~  ^
pydensecrf/eigen.cpp:17045:13: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
    tstate->exc_value = value;
            ^~~~~~~~~
            curexc_value
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
pydensecrf/eigen.cpp:17046:13: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
    tstate->exc_traceback = tb;
            ^~~~~~~~~~~~~
            curexc_traceback
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
pydensecrf/eigen.cpp:17101:24: error: no member named 'exc_type' in '_ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
pydensecrf/eigen.cpp:17102:25: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
pydensecrf/eigen.cpp:17103:22: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
    tmp_tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
pydensecrf/eigen.cpp:17104:13: error: no member named 'exc_type' in '_ts'
    tstate->exc_type = local_type;
    ~~~~~~  ^
pydensecrf/eigen.cpp:17105:13: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
    tstate->exc_value = local_value;
            ^~~~~~~~~
            curexc_value
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
pydensecrf/eigen.cpp:17106:13: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
    tstate->exc_traceback = local_tb;
            ^~~~~~~~~~~~~
            curexc_traceback
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
pydensecrf/eigen.cpp:17128:24: error: no member named 'exc_type' in '_ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
pydensecrf/eigen.cpp:17129:25: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
pydensecrf/eigen.cpp:17130:22: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
    tmp_tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
pydensecrf/eigen.cpp:17131:13: error: no member named 'exc_type' in '_ts'
    tstate->exc_type = *type;
    ~~~~~~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'clang' failed with exit status 1

----------------------------------------

This seems to relate to the problem of cython as mentioned here. However, updating to the lastest version of cython did not solve this problem. I'm using python3.7 with Cython version 0.29.14.

ecamaj commented 4 years ago

Same here with DAWG package.

ZM-J commented 3 years ago

Do you use Windows (Visual C++) to compile C++ programs? I encountered the same problem just now. Any help is welcome.

DeriZSY commented 3 years ago

Do you use Windows (Visual C++) to compile C++ programs? I encountered the same problem just now. Any help is welcome.

No. I make it on ubuntu. I use python3.6 instead of python3.7, then everything is fine

geometrikal commented 3 years ago

Had same problem installing from PyPI - pip install pydensecrf If I installed with pip install git+https://github.com/lucasb-eyer/pydensecrf.git it works fine