Installation Issue
See original GitHub issueHi, hope this is the right place for this issue. I’ve been trying to install cltk with various methods and always find the same error: “Failed building wheel for python-crfsuite”
I have a Mac working on Yosemite 10.10.2 ; Python 3.6.1 with the Anaconda 4.4.0 distribution.
Below is the full message when I run “pip install cltk”
Thanks
Collecting cltk
Requirement already satisfied: pyuca in ./anaconda/lib/python3.6/site-packages (from cltk) (1.2)
Requirement already satisfied: pyyaml in ./anaconda/lib/python3.6/site-packages (from cltk) (3.12)
Requirement already satisfied: nltk in ./anaconda/lib/python3.6/site-packages (from cltk) (3.2.3)
Requirement already satisfied: gitpython in ./anaconda/lib/python3.6/site-packages (from cltk) (2.1.11)
Requirement already satisfied: regex in ./anaconda/lib/python3.6/site-packages (from cltk) (2018.8.29)
Collecting python-crfsuite (from cltk)
Using cached https://files.pythonhosted.org/packages/73/b5/d9640656386b28ca181410f292ffcc3f1c39d9438f0796f874fd5d65ee34/python-crfsuite-0.9.6.tar.gz
Requirement already satisfied: whoosh in ./anaconda/lib/python3.6/site-packages (from cltk) (2.7.4)
Requirement already satisfied: six in ./anaconda/lib/python3.6/site-packages (from nltk->cltk) (1.10.0)
Requirement already satisfied: gitdb2>=2.0.0 in ./anaconda/lib/python3.6/site-packages (from gitpython->cltk) (2.0.5)
Requirement already satisfied: smmap2>=2.0.0 in ./anaconda/lib/python3.6/site-packages (from gitdb2>=2.0.0->gitpython->cltk) (2.0.5)
Building wheels for collected packages: python-crfsuite
Running setup.py bdist_wheel for python-crfsuite ... error
Complete output from command /Users/gusriva/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/1h/wcdq3wg53954_sqxsh05vblr0000gn/T/pip-install-djpc6bn3/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/var/folders/1h/wcdq3wg53954_sqxsh05vblr0000gn/T/pip-wheel-p_vmz0d_ --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/pycrfsuite
copying pycrfsuite/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pycrfsuite
copying pycrfsuite/_dumpparser.py -> build/lib.macosx-10.7-x86_64-3.6/pycrfsuite
copying pycrfsuite/_logparser.py -> build/lib.macosx-10.7-x86_64-3.6/pycrfsuite
running build_ext
building 'pycrfsuite._pycrfsuite' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/pycrfsuite
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib/crf
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib/crf/src
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/swig
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib/cqdb
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib/cqdb/src
creating build/temp.macosx-10.7-x86_64-3.6/liblbfgs
creating build/temp.macosx-10.7-x86_64-3.6/liblbfgs/lib
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/gusriva/anaconda/include -arch x86_64 -I/Users/gusriva/anaconda/include -arch x86_64 -Icrfsuite/include/ -Icrfsuite/lib/cqdb/include -Iliblbfgs/include -Ipycrfsuite -I/Users/gusriva/anaconda/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
----------------------------------------
Failed building wheel for python-crfsuite
Running setup.py clean for python-crfsuite
Failed to build python-crfsuite
Installing collected packages: python-crfsuite, cltk
Running setup.py install for python-crfsuite ... error
Complete output from command /Users/gusriva/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/1h/wcdq3wg53954_sqxsh05vblr0000gn/T/pip-install-djpc6bn3/python-crfsuite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/1h/wcdq3wg53954_sqxsh05vblr0000gn/T/pip-record-0fidwg4n/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/pycrfsuite
copying pycrfsuite/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pycrfsuite
copying pycrfsuite/_dumpparser.py -> build/lib.macosx-10.7-x86_64-3.6/pycrfsuite
copying pycrfsuite/_logparser.py -> build/lib.macosx-10.7-x86_64-3.6/pycrfsuite
running build_ext
building 'pycrfsuite._pycrfsuite' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/pycrfsuite
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib/crf
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib/crf/src
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/swig
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib/cqdb
creating build/temp.macosx-10.7-x86_64-3.6/crfsuite/lib/cqdb/src
creating build/temp.macosx-10.7-x86_64-3.6/liblbfgs
creating build/temp.macosx-10.7-x86_64-3.6/liblbfgs/lib
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/gusriva/anaconda/include -arch x86_64 -I/Users/gusriva/anaconda/include -arch x86_64 -Icrfsuite/include/ -Icrfsuite/lib/cqdb/include -Iliblbfgs/include -Ipycrfsuite -I/Users/gusriva/anaconda/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
----------------------------------------
Command "/Users/gusriva/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/1h/wcdq3wg53954_sqxsh05vblr0000gn/T/pip-install-djpc6bn3/python-crfsuite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/1h/wcdq3wg53954_sqxsh05vblr0000gn/T/pip-record-0fidwg4n/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/1h/wcdq3wg53954_sqxsh05vblr0000gn/T/pip-install-djpc6bn3/python-crfsuite/
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to troubleshoot Windows Installer errors - Microsoft Support
Describes how to troubleshoot problems that occur when you install, uninstall, or upgrade a program on a Windows-based computer by using Windows Installer....
Read more >Fix problems installing Chrome - Google Chrome Help
Fix problems installing Chrome. If you get an error message when you try to download and install Google Chrome, try these fixes.
Read more >12 irritating Windows 10 installation issues, and how to fix them
Having trouble installing and setting up Windows 10? You aren't alone. Here are a dozen-plus of the most common problems, along with a...
Read more >Possible Causes of an Installation Problem
Incorrect patches installed · Installing a patch that does not correspond to your architecture · Permissions problems · The presence of a previous...
Read more >General installation problems - IBM
These problems and resolutions are related to general issues that might occur ... During a Microsoft Windows installation, if you receive a message...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Thank you for your answers! Indeed, it seems to be a problem with the C++ compilers in Anaconda + MacOS. Apparently, it is a common issue. I’ll let you know if I find a solution
Hi Gus, I am not familiar with your setup. But maybe some of my guesses can be helpful to you. The error seems to come from a failing C++ compilation:
This often happens when one tries to install complex Python libraries. On Windows, one can normally solve this by running the command from a shell with admin priviliges or by installing a proper C++ compiler. To make your installation work, you could try doing the same on your system. Have you checked that Anaconda can reach your C++ compiler? Do you have the necessary priviliges to compile stuff from source?
I don’t recommend leaving out the CRF classifier from the package as long as you don’t know whether you actually need it or not. And, as said earlier, the problem is typical for Python, so you are better off if you solve it right away. To do so, it makes sense to ask someone who knows Mac architectures for more specific advice than I can give here.
Cheers, a