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

error with preprocess.py #45

Open
enhiko opened this issue Jul 26, 2016 · 9 comments
Open

error with preprocess.py #45

enhiko opened this issue Jul 26, 2016 · 9 comments

Comments

@enhiko
Copy link

enhiko commented Jul 26, 2016

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
Copy link

radekrepo commented Jul 26, 2016

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
Copy link

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
Copy link

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
Copy link

@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
Copy link

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
Copy link

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
Copy link

iamtechaddict commented May 23, 2018

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
Copy link

starry9t commented Feb 4, 2019

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
Copy link

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

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

10 participants