scrapinghub / python-crfsuite

A python binding for crfsuite
MIT License
770 stars 222 forks source link

Can't install on macOS 10.13.6 with Python 3.7 and pip 18 #92

Closed bileser closed 6 years ago

bileser commented 6 years ago

`sudo -H pip3 install -U python-crfsuite Password: Collecting python-crfsuite Downloading https://files.pythonhosted.org/packages/e7/e8/02618c1e926df4aee70308676511b728b1db4ca9eb52d8c4660c14a44178/python-crfsuite-0.9.5.tar.gz (424kB) 100% |████████████████████████████████| 430kB 145kB/s Building wheels for collected packages: python-crfsuite Running setup.py bdist_wheel for python-crfsuite ... error Complete output from command /Users/bileser/Documents/dev/so_gold/venv_so_gold/bin/python3.7 -u -c "import setuptools, tokenize;file='/private/tmp/pip-install-7cybgk0k/python-crfsuite/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 /private/tmp/pip-wheel-dxb5qg73 --python-tag cp37: running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.13-x86_64-3.7 creating build/lib.macosx-10.13-x86_64-3.7/pycrfsuite copying pycrfsuite/_dumpparser.py -> build/lib.macosx-10.13-x86_64-3.7/pycrfsuite copying pycrfsuite/_logparser.py -> build/lib.macosx-10.13-x86_64-3.7/pycrfsuite copying pycrfsuite/init.py -> build/lib.macosx-10.13-x86_64-3.7/pycrfsuite running build_ext building 'pycrfsuite._pycrfsuite' extension creating build/temp.macosx-10.13-x86_64-3.7 creating build/temp.macosx-10.13-x86_64-3.7/pycrfsuite creating build/temp.macosx-10.13-x86_64-3.7/crfsuite creating build/temp.macosx-10.13-x86_64-3.7/crfsuite/lib creating build/temp.macosx-10.13-x86_64-3.7/crfsuite/lib/crf creating build/temp.macosx-10.13-x86_64-3.7/crfsuite/lib/crf/src creating build/temp.macosx-10.13-x86_64-3.7/crfsuite/swig creating build/temp.macosx-10.13-x86_64-3.7/crfsuite/lib/cqdb creating build/temp.macosx-10.13-x86_64-3.7/crfsuite/lib/cqdb/src creating build/temp.macosx-10.13-x86_64-3.7/liblbfgs creating build/temp.macosx-10.13-x86_64-3.7/liblbfgs/lib clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Icrfsuite/include/ -Icrfsuite/lib/cqdb/include -Iliblbfgs/include -Ipycrfsuite -I/Users/bileser/.pyenv/versions/3.7.0/include/python3.7m -c pycrfsuite/_pycrfsuite.cpp -o build/temp.macosx-10.13-x86_64-3.7/pycrfsuite/_pycrfsuite.o pycrfsuite/_pycrfsuite.cpp:14140:21: error: no member named 'exc_type' in '_ts' *type = tstate->exc_type;


  pycrfsuite/_pycrfsuite.cpp:14141:22: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
      *value = tstate->exc_value;
                       ^~~~~~~~~
                       curexc_value
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  pycrfsuite/_pycrfsuite.cpp:14142:19: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
      *tb = tstate->exc_traceback;
                    ^~~~~~~~~~~~~
                    curexc_traceback
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  pycrfsuite/_pycrfsuite.cpp:14149:24: error: no member named 'exc_type' in '_ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  pycrfsuite/_pycrfsuite.cpp:14150:25: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  pycrfsuite/_pycrfsuite.cpp:14151:22: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  pycrfsuite/_pycrfsuite.cpp:14152:13: error: no member named 'exc_type' in '_ts'
      tstate->exc_type = type;
      ~~~~~~  ^
  pycrfsuite/_pycrfsuite.cpp:14153:13: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
      tstate->exc_value = value;
              ^~~~~~~~~
              curexc_value
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  pycrfsuite/_pycrfsuite.cpp:14154:13: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
      tstate->exc_traceback = tb;
              ^~~~~~~~~~~~~
              curexc_traceback
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  pycrfsuite/_pycrfsuite.cpp:14209:24: error: no member named 'exc_type' in '_ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  pycrfsuite/_pycrfsuite.cpp:14210:25: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  pycrfsuite/_pycrfsuite.cpp:14211:22: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  pycrfsuite/_pycrfsuite.cpp:14212:13: error: no member named 'exc_type' in '_ts'
      tstate->exc_type = local_type;
      ~~~~~~  ^
  pycrfsuite/_pycrfsuite.cpp:14213:13: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
      tstate->exc_value = local_value;
              ^~~~~~~~~
              curexc_value
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  pycrfsuite/_pycrfsuite.cpp:14214:13: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
      tstate->exc_traceback = local_tb;
              ^~~~~~~~~~~~~
              curexc_traceback
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  pycrfsuite/_pycrfsuite.cpp:14236:24: error: no member named 'exc_type' in '_ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  pycrfsuite/_pycrfsuite.cpp:14237:25: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  pycrfsuite/_pycrfsuite.cpp:14238:22: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /Users/bileser/.pyenv/versions/3.7.0/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  pycrfsuite/_pycrfsuite.cpp:14239: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

  ----------------------------------------
  Failed building wheel for python-crfsuite
  Running setup.py clean for python-crfsuite
Failed to build python-crfsuite
Installing collected packages: python-crfsuite
  Running setup.py install for python-crfsuite ... error`
kmike commented 6 years ago

Python 3.7 should be supported in recent python-crfsuite 0.9.6 release. Please reopen if that's not the case and you're still getting errors!

bileser commented 6 years ago

works, thank you!