cemoody / lda2vec

MIT License
3.15k stars 629 forks source link

Unable to Import lda2vec into Python #78

Open mad2code opened 6 years ago

mad2code commented 6 years ago

I have pip installed lda2vec but while importing the same the console throws error.

image

vchandra11 commented 5 years ago

Exactly same issue here too, tried on Windows 10 and even on Collab, absolutely same error ModuleNotFoundError: No module named 'lda2vec' Ironically, when checked using pip show, it shows lda2vec correctly

starry9t commented 5 years ago

Exactly same issue here too, tried on Windows 10 and even on Collab, absolutely same error ModuleNotFoundError: No module named 'lda2vec' Ironically, when checked using pip show, it shows lda2vec correctly

have you solved this? I'm in the same trouble too.

vchandra11 commented 5 years ago

Hi,

For some strange reason although it shows lda2vec, it does not actually get it, only way I could see was to compile. However, if you compile it you will encounter errors below, unless fixes detailed are done :

1. Sr.No. Command Context / instructions Comments

  1. lda2vec-master>python setup.py install Please ensure you are downloading the lda2vec-master, and are in that directory, when compiling Additionally ensure path variable is set correctly, so python is accessible
  2. edit init.py

    change "import <>" to "import lda2vec.<>", else you will have issues of called python files , not being available
    I believe needed to fix corpus.py and topics.py
  3. edit all "print..." to "print (...)" It appears the print statement in this code are without parentheses, so need to change it. This change is needed in multiple .py files. e.g. print prefix + msg --> print (prefix + msg)
  4. edit preprocess.py change line 1 from "from spacy.en import English" to "from spacy.lang.en import English" This is a change in Spacy, additional depth introduced based on languages

    1. I hope this works for you too. Unfortunately, I could not complete testing this due to another priority.

Best wishes,

Chandra P.S. Adding screenshot of table, since formatting is getting lost here. image


From: starry9t notifications@github.com Sent: Monday, February 4, 2019 6:47 AM To: cemoody/lda2vec Cc: vchandra11; Comment Subject: Re: [cemoody/lda2vec] Unable to Import lda2vec into Python (#78)

Exactly same issue here too, tried on Windows 10 and even on Collab, absolutely same error ModuleNotFoundError: No module named 'lda2vec' Ironically, when checked using pip show, it shows lda2vec correctly

have you solved this? I'm in the same trouble too.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/cemoody/lda2vec/issues/78#issuecomment-460275225, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVPqM_Ff-qrcduCXQGZcV_qPuqfHkxK5ks5vKEfwgaJpZM4WPJl6.