vi3k6i5 / GuidedLDA

semi supervised guided topic model with custom guidedLDA
Mozilla Public License 2.0
497 stars 108 forks source link

Google Colab Guided LDA Install Issue #66

Open chughe22 opened 1 year ago

chughe22 commented 1 year ago

When I try to install guidedlda in google colab I get the following errors:

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting guidedlda Using cached guidedlda-2.0.0.dev22.tar.gz (2.1 MB) Preparing metadata (setup.py) ... done Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (from guidedlda) (1.21.6) Building wheels for collected packages: guidedlda error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. Building wheel for guidedlda (setup.py) ... error ERROR: Failed building wheel for guidedlda Running setup.py clean for guidedlda Failed to build guidedlda Installing collected packages: guidedlda error: subprocess-exited-with-error

× Running setup.py install for guidedlda did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. Running setup.py install for guidedlda ... error error: legacy-install-failure

× Encountered error while trying to install package. ╰─> guidedlda

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

wangjun4 commented 1 year ago

Were you able to solve this problem? I am facing the same problem now... Please let me know if you solved it...

wangjun4 commented 1 year ago

After hours of searching and trying, I was eventually able to make it work on Colab following this method.

More specifically, on Colab:

  1. Install the original LDA package
    • you can just use: !pip install lda
  2. Pull down the repository: /usr/local/lib/python3.9/dist-packages/lda
  3. Drop the *.py files from the GuidedLDA_WorkAround repo in the lda folder under site-packages for your specific enviroment.