cemoody / lda2vec

MIT License
3.15k stars 628 forks source link

error with preprocess.py #45

Open enhiko opened 8 years ago

enhiko commented 8 years ago

hello i have this error in preprocess.py

python3 preprocess.py Traceback (most recent call last): File "preprocess.py", line 8, in from lda2vec import preprocess, Corpus File "/usr/local/lib/python3.5/dist-packages/lda2vec-0.1-py3.5.egg/lda2vec/init.py", line 1, in ImportError: No module named 'dirichlet_likelihood'

but there is no module named 'dirichlet_likehood' in https://pypi.python.org/pypi .

radekrepo commented 8 years ago

What operating system do you use with lda2vec?

Myself I don't know how could I help you. I can only say that I had a lot of problems like that when I used my computer that runs on Windows. I ended up resorting to expert help in my office because it was too complex for my skill level

agtsai-i commented 8 years ago

Odd, that file is referencing dirichlet_likelihood which resides in the same folder. Maybe something weird is going on with your search path? Try:

import sys
print(sys.path)

And see if it makes sense.

chenjun0210 commented 8 years ago

when i run preprocess.py Traceback (most recent call last): File "preprocess.py", line 56, in vectors, s, f = corpus.compact_word_vectors(vocab, filename=fn_wordvc) File "build/bdist.linux-x86_64/egg/lda2vec/corpus.py", line 575, in compact_word_vectors NameError: global name 'damerau_levenshtein_distance_withNPArray' is not defined

crawfordcomeaux commented 8 years ago

@chenjun0210 Your issue might be fixed via #46. Apply the changes to corpus.py & also confirm you have the packages mentioned in the PR's first comment.

mostafa-mahmoud commented 7 years ago

The problem for this issue, is that (seems you're using python3) in python3 it should be imported using import lda2vec.dirichlet_likelihood and not import dirichlet_likelihood Uninstalling lda2vec, and making this change for all imported modules in init.py fixed the problem.

MaisHanoon commented 7 years ago

In addition to updating the import , I had to append the below to ~./bash_profile:

export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 And then run: $ source ~/.bash_profile

iamtechaddict commented 6 years ago

Even I'm facing the same issue I'm installed using setup.py and I'm getting this error

import lda2vec Traceback (most recent call last): File "", line 1, in File "C:\Users\rkumar3\AppData\Local\Continuum\anaconda3\lib\site-packages\lda2vec-0.1-py3.6.egg\lda2vec__init__.py", line 1, in ModuleNotFoundError: No module named 'dirichlet_likelihood'

starry9t commented 5 years ago

In addition to updating the import , I had to append the below to ~./bash_profile:

export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 And then run: $ source ~/.bash_profile

tried this but not working.

sudheernaidu53 commented 5 years ago

hi, I have faced similar problems too, and there were many files missing from lda2vec after installation using pip install. I was able to move the files around from git to local folder where lda2vec has been installed but I am not able to find this one function called 'move'. Can anyone help me from lda2vec.utils import move ImportError: cannot import name 'move' from 'lda2vec.utils' (C:\Users\Sudheera\Anaconda3\lib\site-packages\lda2vec\utils.py