scrapinghub / python-crfsuite

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

Installation issue Mac OS X #69

Closed mikekestemont closed 6 years ago

mikekestemont commented 6 years ago

I am getting an installation issue on Mac OS X (10.10.5), Python 3.6, both with pip and the setup.py from the repo:

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I//anaconda/envs/py36/include -arch x86_64 -I//anaconda/envs/py36/include -arch x86_64 -Icrfsuite/include/ -Icrfsuite/lib/cqdb/include -Iliblbfgs/include -Ipycrfsuite -I//anaconda/envs/py36/include/python3.6m -c pycrfsuite/_pycrfsuite.cpp -o build/temp.macosx-10.7-x86_64-3.6/pycrfsuite/_pycrfsuite.o -std=c99 error: invalid argument '-std=c99' not allowed with 'C++/ObjC++' error: command 'gcc' failed with exit status 1

Is this a known issue that I could easily fix? All help would be greatly appreciated!

Update: via conda, it works: conda install -c conda-forge python-crfsuite

kmike commented 6 years ago

It looks like this issue is conda-specific (https://github.com/scrapinghub/python-crfsuite/issues/47). I have no idea why this happens :) I think the fix could be to bump version on conda-forge.

kmike commented 6 years ago

Of course, unless someone can send a pull request which makes it install via pip on conda environments as well.

mikekestemont commented 6 years ago

Thanks. I'll look into it.

kmike commented 6 years ago

We also provide binary wheels for OS X now, but I'm not sure they work in OS X 10.10

mikekestemont commented 6 years ago

Thanks for the quick replies. Conda users can resort to conda install -c conda-forge python-crfsuite so I'll close this.

ariddell commented 6 years ago

From the wheel filename it doesn't look like 10.10 is supported: python_crfsuite-0.9.5-cp36-cp36m-macosx_10_11_x86_64.whl

mikekestemont commented 6 years ago

I upgraded to 10.12.6 overnight and this solves the issue. Thanks.

ghezalahmad commented 6 years ago

Dear Mike, can you show me the structure of train.txt, how to train our data that should be acceptable to CRF.model.

ljch2018 commented 6 years ago

In my case , the reason is sentence is too long, which make it out of memroy.

nathaniel-lemonade commented 5 years ago

For me worked to install Python3.6.4 and no later ... even 3.6.5 fails (and later of course). Install Python3.6 from here: https://www.python.org/downloads/mac-osx/ Works