maciejkula/glove-python

Can't install in Mac IOS

emtranslateur opened this issue · 8 comments

None of the solutions actually work in IOS. Can someone help, please?

I think you mean macOS. If so, you need to do the following things :

  1. install python2 from Homebrew : brew install python2
  2. install gcc6 from Homebrew : brew install gcc@6
  3. set gcc6 as the compiler : export CC=/usr/local/Cellar/gcc@6/6.4.0/bin/g++-6
  4. install the package with python2 from Homebrew : python2 -m pip install --no-cache-dir glove_python

Jumping back and forth between threads here. I am having this same issue.

@theravengod I did what you said but now i receive this error:
/usr/local/Cellar/gcc@6/6.4.0_2/bin/g++-6 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -W shorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe - I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c glove/glove_cython.c -o build/temp. macosx-10.13-intel-2.7/glove/glove_cython.o -fopenmp -ffast-math -march=native g++-6: warning: x86_64 conflicts with i386 (arch flags ignored) g++-6: error: unrecognized command line option '-Wshorten-64-to-32' error: command '/usr/local/Cellar/gcc@6/6.4.0_2/bin/g++-6' failed with exit status 1

but then I solved it by running:
export CFLAGS="-Wa,-q"

I did the following and it worked for me

  1. $ conda install llvm gcc libgcc
  2. $ pip install glove_python

Hi @Binathi, while your specified commands worked in macos (glove_python is now installed), the following command is not working in my python project:

from glove import Corpus, Glove

I tried with "import glove.Glove" but no luck. The error is either "module 'glove' has no attribute 'Glove'" or "cannot import name 'Corpus'"

I think you mean macOS. If so, you need to do the following things :

  1. install python2 from Homebrew : brew install python2
  2. install gcc6 from Homebrew : brew install gcc@6
  3. set gcc6 as the compiler : export CC=/usr/local/Cellar/gcc@6/6.4.0/bin/g++-6
  4. install the package with python2 from Homebrew : python2 -m pip install --no-cache-dir glove_python

also could apply to python3.6. Really thank u!

I think you mean macOS. If so, you need to do the following things :

  1. install python2 from Homebrew : brew install python2
  2. install gcc6 from Homebrew : brew install gcc@6
  3. set gcc6 as the compiler : export CC=/usr/local/Cellar/gcc@6/6.4.0/bin/g++-6
  4. install the package with python2 from Homebrew : python2 -m pip install --no-cache-dir glove_python

also could apply to python3.6. Really thank u!

really also work in python3.6 and gcc(9.3.0), thank u!

I think you mean macOS. If so, you need to do the following things :

  1. install python2 from Homebrew : brew install python2
  2. install gcc6 from Homebrew : brew install gcc@6
  3. set gcc6 as the compiler : export CC=/usr/local/Cellar/gcc@6/6.4.0/bin/g++-6
  4. install the package with python2 from Homebrew : python2 -m pip install --no-cache-dir glove_python

To anyone who's interested,

This won't work for python version 3.7 and above, switch your version to < 3.7