Unable to install in Mac
HarshTrivedi opened this issue · 3 comments
HarshTrivedi commented
After installing swig
, I get following error on pip install jamspell
in mac. On ubuntu system it worked though.
Collecting jamspell
Using cached https://files.pythonhosted.org/packages/5a/16/0a808e926a835604007066085cb2183b337694a06240a99945b31fa14f27/jamspell-0.0.11.tar.gz
Building wheels for collected packages: jamspell
Running setup.py bdist_wheel for jamspell ... error
Complete output from command /Users/harshtrivedi/anaconda2/envs/allennlp051/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-install-n3pybnje/jamspell/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/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-wheel-2cy6892v --python-tag cp36:
running bdist_wheel
running build
running build_ext
building '_jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
/Users/harshtrivedi/anaconda2/envs/allennlp051/bin/swig -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/jamspell
creating build/temp.macosx-10.7-x86_64-3.6/contrib
creating build/temp.macosx-10.7-x86_64-3.6/contrib/cityhash
creating build/temp.macosx-10.7-x86_64-3.6/contrib/phf
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include -arch x86_64 -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include -arch x86_64 -I. -Ijamspell -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include/python3.6m -c jamspell/lang_model.cpp -o build/temp.macosx-10.7-x86_64-3.6/jamspell/lang_model.o -std=c++11 -O2
In file included from jamspell/lang_model.cpp:9:
jamspell/lang_model.hpp:3:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for jamspell
Running setup.py clean for jamspell
Failed to build jamspell
Installing collected packages: jamspell
Running setup.py install for jamspell ... error
Complete output from command /Users/harshtrivedi/anaconda2/envs/allennlp051/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-install-n3pybnje/jamspell/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/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-record-evaofjjm/install-record.txt --single-version-externally-managed --compile:
running install
running build_ext
building '_jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
/Users/harshtrivedi/anaconda2/envs/allennlp051/bin/swig -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/jamspell
creating build/temp.macosx-10.7-x86_64-3.6/contrib
creating build/temp.macosx-10.7-x86_64-3.6/contrib/cityhash
creating build/temp.macosx-10.7-x86_64-3.6/contrib/phf
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include -arch x86_64 -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include -arch x86_64 -I. -Ijamspell -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include/python3.6m -c jamspell/lang_model.cpp -o build/temp.macosx-10.7-x86_64-3.6/jamspell/lang_model.o -std=c++11 -O2
In file included from jamspell/lang_model.cpp:9:
jamspell/lang_model.hpp:3:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Users/harshtrivedi/anaconda2/envs/allennlp051/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-install-n3pybnje/jamspell/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/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-record-evaofjjm/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-install-n3pybnje/jamspell/
Any suggestions?
bakwc commented
I made a possible fix. Please try to install, if ok I will merge it and release a version with fix.
- clone git repository
- checkout branch with fix:
git checkout tryFixMacInstall
- install:
sudo python2.7 -m setup.py install
(where python2.7 - your python)
HarshTrivedi commented
@bakwc Thanks for getting back on this! It worked : I tried it with python 2.7 and 3.6.
bakwc commented
Fixed in master.