MIND-Lab / OCTIS

OCTIS: Comparing Topic Models is Simple! A python package to optimize and evaluate topic models (accepted at EACL2021 demo track)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot install OCTIS

srbnghosh99 opened this issue · comments

  • OCTIS version:
  • Python version:3.8
  • Operating System:MAC

Description

Cannot install OCTIS using pip command
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

pip install octis

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

Collecting octis
Using cached octis-1.13.0-py2.py3-none-any.whl (130 kB)
Requirement already satisfied: gensim==4.2.0 in /usr/local/lib/python3.10/dist-packages (from octis) (4.2.0)
Requirement already satisfied: nltk in /usr/local/lib/python3.10/dist-packages (from octis) (3.8.1)
Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from octis) (1.5.3)
Requirement already satisfied: spacy in /usr/local/lib/python3.10/dist-packages (from octis) (3.5.4)
Collecting scikit-learn==0.24.2 (from octis)
Using cached scikit-learn-0.24.2.tar.gz (7.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) 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.
Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

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

This issue occur due to scikit-learn==0.24.2 version.
In my case, I installed scikit-learn==0.24.2 version first with these commands:
!git clone --branch 0.24.2 https://github.com/scikit-learn/scikit-learn.git
%cd scikit-learn
!python setup.py install
After installing scikit-learn, install octis library with (!pip install octis)
Note:I run all theses command on Colab with by default python version 3.10

commented

This issue occur due to scikit-learn==0.24.2 version. In my case, I installed scikit-learn==0.24.2 version first with these commands: !git clone --branch 0.24.2 https://github.com/scikit-learn/scikit-learn.git %cd scikit-learn !python setup.py install After installing scikit-learn, install octis library with (!pip install octis) Note:I run all theses command on Colab with by default python version 3.10

I am also encountering the same problem, and I am not able to solve it like this.

!pip install octis --no-dependencies
!pip install gensim==4.2.0
!pip install nltk
!pip install pandas
!pip install spacy

This fixed my issues. I have installed octis without dependencies and later imported the required ones. Don't know if its an ideal solution but hope it fixes your issue.

Hi, not sure why this is happening. I have no problems on my laptop and I'm using python 3.10. Also I didn't have any issue on the GitHub server for python 3.10. However, it does seem all versions of scikit-learn prior to 1.1.0 do not support python 3.10 (https://github.com/scikit-learn/scikit-learn/releases/tag/1.0).

I'll push a new OCTIS release that uses scikit-learn v1.1.0. Hope it will solve this issue. Colab doesn't seem to complain with this version.