glove-python
glove-python copied to clipboard
fails to install with pip on osx
On a mac (osx 10.12) both clang and gcc seem to fail. output below ...
Building wheels for collected packages: glove-python Running setup.py bdist_wheel for glove-python ... error Complete output from command /Users/barry/miniconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/31/yd2dv9h54m7_9fp95r8llkk80000gn/T/pip-build-i_roohw3/glove-python/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 /var/folders/31/yd2dv9h54m7_9fp95r8llkk80000gn/T/tmpj98_zqpmpip-wheel- --python-tag cp35: running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.5 creating build/lib.macosx-10.9-x86_64-3.5/glove copying glove/init.py -> build/lib.macosx-10.9-x86_64-3.5/glove copying glove/corpus.py -> build/lib.macosx-10.9-x86_64-3.5/glove copying glove/glove.py -> build/lib.macosx-10.9-x86_64-3.5/glove running build_ext building 'glove.glove_cython' extension creating build/temp.macosx-10.9-x86_64-3.5 creating build/temp.macosx-10.9-x86_64-3.5/glove gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/barry/miniconda3/include -arch x86_64 -I/Users/barry/miniconda3/include/python3.5m -c glove/glove_cython.c -o build/temp.macosx-10.9-x86_64-3.5/glove/glove_cython.o -fopenmp -ffast-math -march=native clang: error: unsupported option '-fopenmp' error: command 'gcc' failed with exit status 1
@barryef You are still using clang I believe. If you have gcc installed via brew, try setting the compiler via
export CC=/usr/local/Cellar/gcc/6.3.0_1/bin/g++-6
Then run the pip install. The path above should be corrected for your gcc version
Try this
export CC="/usr/local/bin/gcc-6"
export CFLAGS="-Wa,-q"
pip install glove_python
You need to install gcc via brew: brew install gcc and then export gcc into CC like: export CC=/usr/local/Cellar/gcc/6.3.0_1/bin/g++-6
you should change "6.3.0_1" & "g++-6" according to your version.
Try this:
$ conda install llvm gcc libgcc $ pip install glove_python
You need to install gcc via brew: brew install gcc and then export gcc into CC like: export CC=/usr/local/Cellar/gcc/6.3.0_1/bin/g++-6
you should change "6.3.0_1" & "g++-6" according to your version.
Thanks so much. This worked for installing pyicu! I used 'conda install gcc', though.
Try this
export CC="/usr/local/bin/gcc-6" export CFLAGS="-Wa,-q" pip install glove_python
This has just saved my whole week! thank you 👍🏻 @harpreetset1
I had the same initial problem and did the following as mentioned here
You need to install gcc via brew: brew install gcc and then export gcc into CC like: export CC=/usr/local/Cellar/gcc/6.3.0_1/bin/g++-6
you should change "6.3.0_1" & "g++-6" according to your version.
I changed to 8.3.0. Now I get another error.
regex_3/_regex.c:26401:37: error: invalid conversion from 'void*' to 'RE_LocaleInfo*' [-fpermissive] self->locale_info = re_alloc(sizeof(RE_LocaleInfo)); ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ error: command '/usr/local/Cellar/gcc/8.3.0/bin/g++-8' failed with exit status 1
Any ideas whats the problem?
I had the same initial problem and did the following as mentioned here
You need to install gcc via brew: brew install gcc and then export gcc into CC like: export CC=/usr/local/Cellar/gcc/6.3.0_1/bin/g++-6 you should change "6.3.0_1" & "g++-6" according to your version.
I changed to 8.3.0. Now I get another error.
regex_3/_regex.c:26401:37: error: invalid conversion from 'void*' to 'RE_LocaleInfo*' [-fpermissive] self->locale_info = re_alloc(sizeof(RE_LocaleInfo));
error: command '/usr/local/Cellar/gcc/8.3.0/bin/g++-8' failed with exit status 1
Any ideas whats the problem?
@oliverk90 I would suggest installing the gcc 6 instead of 8. Maybe that's the cause of the problem.
as @erccarls stated, exporting true version for gcc is important.
- ''brew install gcc'' (if installed already, ''brew upgrade gcc'' to make sure to have latest version )
- export CC=CC=/usr/local/Cellar/gcc/8.3.0/bin/g++-8 (you must check which version you have in gcc directory, for me it's 8.3.0)
- pip install glove_python
Try this
export CC="/usr/local/bin/gcc-6" export CFLAGS="-Wa,-q" pip install glove_python
Before this Downgrade to python 3.6 , there is some issue with python 3.7 glove installation
I get the following error when I run -pip install glove_python, can someone please help!
Collecting glove_python Using cached https://files.pythonhosted.org/packages/3e/79/7e7e548dd9dcb741935d031117f4bed133276c2a047aadad42f1552d1771/glove_python-0.1.0.tar.gz Requirement already satisfied: numpy in /Users/gaurangajitambani/miniconda3/envs/untitled/lib/python3.7/site-packages (from glove_python) (1.17.2) Requirement already satisfied: scipy in /Users/gaurangajitambani/miniconda3/envs/untitled/lib/python3.7/site-packages (from glove_python) (1.3.1) Building wheels for collected packages: glove-python Building wheel for glove-python (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/gaurangajitambani/miniconda3/envs/untitled/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/setup.py'"'"'; file='"'"'/private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/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/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-wheel-k0u6cuil --python-tag cp37 cwd: /private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/ Complete output (16 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.7 creating build/lib.macosx-10.9-x86_64-3.7/glove copying glove/init.py -> build/lib.macosx-10.9-x86_64-3.7/glove copying glove/glove.py -> build/lib.macosx-10.9-x86_64-3.7/glove copying glove/corpus.py -> build/lib.macosx-10.9-x86_64-3.7/glove running build_ext building 'glove.glove_cython' extension creating build/temp.macosx-10.9-x86_64-3.7 creating build/temp.macosx-10.9-x86_64-3.7/glove gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/gaurangajitambani/miniconda3/envs/untitled/include -arch x86_64 -I/Users/gaurangajitambani/miniconda3/envs/untitled/include -arch x86_64 -I/Users/gaurangajitambani/miniconda3/envs/untitled/include/python3.7m -c glove/glove_cython.c -o build/temp.macosx-10.9-x86_64-3.7/glove/glove_cython.o -fopenmp -ffast-math -march=native clang: error: unsupported option '-fopenmp' error: command 'gcc' failed with exit status 1
ERROR: Failed building wheel for glove-python Running setup.py clean for glove-python ERROR: Command errored out with exit status 1: command: /Users/gaurangajitambani/miniconda3/envs/untitled/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/setup.py'"'"'; file='"'"'/private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' clean --all cwd: /private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python Complete output (6 lines): usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help
error: option --all not recognized
ERROR: Failed cleaning build dir for glove-python Failed to build glove-python Installing collected packages: glove-python Running setup.py install for glove-python ... error ERROR: Command errored out with exit status 1: command: /Users/gaurangajitambani/miniconda3/envs/untitled/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/setup.py'"'"'; file='"'"'/private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/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/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-record-5u39ky70/install-record.txt --single-version-externally-managed --compile cwd: /private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/ Complete output (8 lines): running install running build running build_py running build_ext building 'glove.glove_cython' extension gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/gaurangajitambani/miniconda3/envs/untitled/include -arch x86_64 -I/Users/gaurangajitambani/miniconda3/envs/untitled/include -arch x86_64 -I/Users/gaurangajitambani/miniconda3/envs/untitled/include/python3.7m -c glove/glove_cython.c -o build/temp.macosx-10.9-x86_64-3.7/glove/glove_cython.o -fopenmp -ffast-math -march=native clang: error: unsupported option '-fopenmp' error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/gaurangajitambani/miniconda3/envs/untitled/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/setup.py'"'"'; file='"'"'/private/var/folders/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-install-w_s8dpij/glove-python/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/10/lrbc2zks4x78d1rfzh5g5fs00000gn/T/pip-record-5u39ky70/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.