Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install glove-python on linux #103

Open
ty2009137128 opened this issue Oct 28, 2019 · 3 comments
Open

install glove-python on linux #103

ty2009137128 opened this issue Oct 28, 2019 · 3 comments

Comments

@ty2009137128
Copy link

hi,if you install glove-python on linux you can try some steps as:

  1. install gcc , "yum install gcc"
  2. install cython , pip , python or conda install cython and make sure cython.version>0.29
  3. cython **. pyx ,just looke this Error Installing with Python 3.7 #96 (comment)
  4. over write setup.py and unable to install on Win 7 #42 (comment)
  5. the last python setup.py install ,it would be ok.
@obaidullahzaland
Copy link

Hi,
after doing all the above procedures as said. I am getting the following error

from glove import Glove
Traceback (most recent call last):
File "", line 1, in
File "/home/zaland/glove-python/glove/init.py", line 1, in
from .corpus import Corpus
File "/home/zaland/glove-python/glove/corpus.py", line 10, in
from .corpus_cython import construct_cooccurrence_matrix
ModuleNotFoundError: No module named 'glove.corpus_cython'
exit()

@IronFarm
Copy link

@obaidullahzaland if you installed Glove by deleting the stdc++ dependency then Glove will not work. The dependency is there because it is needed.

@padriba
Copy link

padriba commented Dec 23, 2020

Hi
if you get this error
glove/corpus_cython.cpp: In function ‘void __pyx_f_5glove_13corpus_cython_increment_matrix(__pyx_t_5glove_13corpus_cython_SparseRowMatrix*, int, int, float)’: glove/corpus_cython.cpp:2619:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] __pyx_t_1 = ((__pyx_v_row >= __pyx_v_mat->indices->size()) != 0); ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ glove/corpus_cython.cpp:2761:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] __pyx_t_1 = ((__pyx_v_idx == __pyx_v_row_indices->size()) != 0); ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ glove/corpus_cython.cpp: In function ‘int __pyx_f_5glove_13corpus_cython_matrix_nnz(__pyx_t_5glove_13corpus_cython_SparseRowMatrix*)’: glove/corpus_cython.cpp:2952:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { ~~~~~~~~~~^~~~~~~~~~~ glove/corpus_cython.cpp: In function ‘PyObject* __pyx_f_5glove_13corpus_cython_matrix_to_coo(__pyx_t_5glove_13corpus_cython_SparseRowMatrix*, int)’: glove/corpus_cython.cpp:3222:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {

you just need to add unsigned as suggest by this link to the lines mentioned by warnings example :
__pyx_t_1 = (((unsigned) __pyx_v_row >= __pyx_v_mat->indices->size()) != 0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants