lda-project / lda

Topic modeling with latent Dirichlet allocation using Gibbs sampling
https://lda.readthedocs.io/
Mozilla Public License 2.0
1.24k stars 390 forks source link

ModuleNotFoundError: No module named 'lda._lda'; 'lda' is not a package #113

Closed vidushika99 closed 3 years ago

vidushika99 commented 3 years ago

when I tried to run the project I got an error saying ModuleNotFoundError: No module named 'lda._lda'; 'lda' is not a package. and I found a solution from https://www.programmersought.com/article/48705949273/ here and as it says I renamed 'lda' folder. but still I am getting this error. Could you please check on this?

lda

severinsimmler commented 3 years ago

You have to compile it first, because this package is partially written in C via Cython. It's easier if you install the wheel:

$ pip install lda
vidushika99 commented 3 years ago

Thank you for your response. I have tried these steps. I tried with the wheel too. but still, I am getting that error. Could you please check on this?

severinsimmler commented 3 years ago

Make sure your current directory does not contain the source code or a folder lda. Python prefers local over installed packages. And try to set up a new and clean virtual environment where you pip install the wheel.

vidushika99 commented 3 years ago

Thank you. I'll try this

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

HrishikeshGadekar commented 2 years ago

You have to compile it first, because this package is partially written in C via Cython. It's easier if you install the wheel:

$ pip install lda

Hi @severinsimmler,

I am caught up with the exact same issue. It would be great if you could explain a bit on how exactly to make this cython file work.

parth-verma7 commented 2 years ago

You have to compile it first, because this package is partially written in C via Cython. It's easier if you install the wheel:

$ pip install lda

installing lda is also giving up error...

HrishikeshGadekar commented 2 years ago

Hi @parth-verma7 , Could you share the logs or screenshot of the error to help better?

parth-verma7 commented 2 years ago

Hi @HrishikeshGadekar image have a look please, i tried it installing using pip install lda, ad then it showed error

HrishikeshGadekar commented 2 years ago

Hi @parth-verma7 ,

Please install Microsoft C++ Build tools. You can find more help here: https://stackoverflow.com/questions/40504552/how-to-install-visual-c-build-tools.

The process is reasonably hectic but ensure you install the build tools successfully. Once you have done so, hopefully, it should install lda. If not, please share the error logs again.

Thank You