maciejkula/glove-python

Can't install glove_python

repeating opened this issue · 19 comments

When trying to install glove_python via pip as in the readme instructions, it gives an error.
I'm trying to install it on macOS M1 cheap, pip version 22.2.1, and python version 3.8.13

Here's the error message:

Collecting glove_python
  Using cached glove_python-0.1.0.tar.gz (263 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /opt/anaconda3/envs/Log2Sim/lib/python3.8/site-packages (from glove_python) (1.23.1)
Requirement already satisfied: scipy in /opt/anaconda3/envs/Log2Sim/lib/python3.8/site-packages (from glove_python) (1.9.0)
Building wheels for collected packages: glove_python
  Building wheel for glove_python (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      /opt/anaconda3/envs/Log2Sim/lib/python3.8/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-cpython-38
      creating build/lib.macosx-10.9-x86_64-cpython-38/glove
      copying glove/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/glove
      copying glove/glove.py -> build/lib.macosx-10.9-x86_64-cpython-38/glove
      copying glove/corpus.py -> build/lib.macosx-10.9-x86_64-cpython-38/glove
      running build_ext
      building 'glove.glove_cython' extension
      creating build/temp.macosx-10.9-x86_64-cpython-38
      creating build/temp.macosx-10.9-x86_64-cpython-38/glove
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/envs/Log2Sim/include -fPIC -O2 -isystem /opt/anaconda3/envs/Log2Sim/include -I/opt/anaconda3/envs/Log2Sim/include/python3.8 -c glove/glove_cython.c -o build/temp.macosx-10.9-x86_64-cpython-38/glove/glove_cython.o -fopenmp -ffast-math -march=native
      clang: error: unsupported option '-fopenmp'
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for glove_python
  Running setup.py clean for glove_python
  error: subprocess-exited-with-error
  
  × python setup.py clean did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      /opt/anaconda3/envs/Log2Sim/lib/python3.8/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      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
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  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: subprocess-exited-with-error
  
  × Running setup.py install for glove_python did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      /opt/anaconda3/envs/Log2Sim/lib/python3.8/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      running install
      /opt/anaconda3/envs/Log2Sim/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      running build_ext
      building 'glove.glove_cython' extension
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/envs/Log2Sim/include -fPIC -O2 -isystem /opt/anaconda3/envs/Log2Sim/include -I/opt/anaconda3/envs/Log2Sim/include/python3.8 -c glove/glove_cython.c -o build/temp.macosx-10.9-x86_64-cpython-38/glove/glove_cython.o -fopenmp -ffast-math -march=native
      clang: error: unsupported option '-fopenmp'
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> glove_python

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Please help me to fix this issue.
Thank you!

use pip install glove-python-binary

@RobinLoxlyHood it does not work - can you confirm it works for you?

@RobinLoxlyHood it didn't work. I got the exact same error.

me too

I'm using python3.10. In my case, pip install glove_python and pip install glove-python-binary did not work.
I solve this problem using pip install glove-python3.

@BitnaKeum Oh!!!!!!! Thanks... After 2023, colab was updated to python 3.10 version, and I kept looking for articles that solved the issue related to glove installation, but all they said was to install only the binary. I couldn't find a way to solve the related issue, but it is the only solution pip install glove-python3.. thank you. It works fine. (in Colab)

oezeb commented

I'm using python3.10. In my case, pip install glove_python and pip install glove-python-binary did not work. I solve this problem using pip install glove-python3.

This worked for me! Thanks :)

我正在使用 python3.10。就我而言,没有用。我使用 .pip install glove_python``pip install glove-python-binary``pip install glove-python3

thank u,is only right way

pip install glove-python3 is not working.
error with
#include "longintrepr.h"
can you replace it with #include <python3.11/cpython/longintrepr.h>?

Ok, super, but how can I install this fixed version? ;)

Since I use system packages in Debian 12 (stable), I can use only default Python, which is 3.11.2. I cannot downgrade the whole OS. I am still recovering from upgrading it a few weeks ago because of an urgent need.

Collecting glove-python3
Using cached glove_python3-0.1.0.tar.gz (326 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /usr/local/lib/python3.11/dist-packages (from glove-python3) (1.26.4)
Requirement already satisfied: scipy in /usr/local/lib/python3.11/dist-packages (from glove-python3) (1.13.1)
Building wheels for collected packages: glove-python3
Building wheel for glove-python3 (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
/usr/lib/python3/dist-packages/setuptools/dist.py:775: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/glove
copying glove/glove.py -> build/lib.linux-x86_64-cpython-311/glove
copying glove/corpus.py -> build/lib.linux-x86_64-cpython-311/glove
copying glove/init.py -> build/lib.linux-x86_64-cpython-311/glove
creating build/lib.linux-x86_64-cpython-311/glove/metrics
copying glove/metrics/accuracy.py -> build/lib.linux-x86_64-cpython-311/glove/metrics
copying glove/metrics/init.py -> build/lib.linux-x86_64-cpython-311/glove/metrics
running build_ext
building 'glove.glove_cython' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/glove
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.11 -c glove/glove_cython.c -o build/temp.linux-x86_64-cpython-311/glove/glove_cython.o -fopenmp -ffast-math -march=native
glove/glove_cython.c:217:12: fatal error: longintrepr.h: Nema takve datoteke ili direktorija
217 | #include "longintrepr.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for glove-python3
Running setup.py clean for glove-python3
error: subprocess-exited-with-error

× python setup.py clean did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
/usr/lib/python3/dist-packages/setuptools/dist.py:775: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
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
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed cleaning build dir for glove-python3
Failed to build glove-python3
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (glove-python3)

@Puladela this project is dead. I suggest to move on to open source embedding models based like HF embedding or whatever

@Puladela Im saying the ecosystems have moved, Python versions, dependencies etc. So its hard to use this repo in 2024. If you have time you could fork this and add modern compatibility for others