maciejkula / glove-python

Toy Python implementation of http://www-nlp.stanford.edu/projects/glove/
Apache License 2.0
1.25k stars 319 forks source link

ImportError: cannot import name Corpus #54

Closed igorbpf closed 7 years ago

igorbpf commented 7 years ago

When I try to import glove, I get this. Does anyone know a solution?

draperunner commented 7 years ago

Use from glove import Corpus or import glove.corpus

igorbpf commented 7 years ago

Weird! Yesterday I did that and it didn't work. After u said, it worked! lol Thanks very much! :-)

Palak-B commented 5 years ago

Use from glove import Corpus or import glove.corpus

I did the same but I'm getting this. Cannot import name 'Corpus' from 'glove' (/anaconda3/lib/python3.7/site-packages/glove/init.py)

lingadhar commented 5 years ago

same error appeared for me as well. Somebody please post the solution if any..Thanks in advance

nghidinhit commented 5 years ago

what is the name of python file and package? Is it glove.py? Change the name of package and python file, it must be different from 'glove'

christianfarru commented 5 years ago

Could someone please post the solution (if any)

chinmay81192 commented 5 years ago

Getting the same error even using a different file name

File "glove_embeddings.py", line 10, in from glove import Corpus, Glove ImportError: cannot import name 'Corpus' from 'glove' (C:\Program Files\Python37\lib\site-packages\glove__init__.py)

bihani-g commented 4 years ago

Try installing the glove package through the following command: ! pip install glove_python

And then import Corpus and Glove: from glove import Glove, Corpus

steysie commented 4 years ago

Try installing the glove package through the following command: ! pip install glove_python

And then import Corpus and Glove: from glove import Glove, Corpus

Unfortunately, still unable to import Corpus. Did anyone find other solutions?

bluetyson commented 4 years ago

Not yet.

thepratman25 commented 4 years ago

I am still getting the same error. Someone please help.

gmihran commented 2 years ago

I also had the same problem. The problem was solved when I installed as follows.

pip install glove-python-binary