lda2vec icon indicating copy to clipboard operation
lda2vec copied to clipboard

Unable to Import lda2vec into Python

Open mad2code opened this issue 6 years ago • 3 comments

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

image

mad2code avatar Aug 28 '18 08:08 mad2code

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

vchandra11 avatar Jan 01 '19 18:01 vchandra11

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.

starry9t avatar Feb 04 '19 14:02 starry9t

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 :

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
    
  5. 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 [email protected] 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.

vchandra11 avatar Feb 04 '19 17:02 vchandra11