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

ModuleNotFoundError: No module named 'gensim.sklearn_api' on import #236

Open
clstaudt opened this issue Sep 17, 2023 · 2 comments
Open

Comments

@clstaudt
Copy link

import texthero
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
[/Users/cls/Documents/Work/Projects/Beiersdorf/SubProjects/CognitiveSearch/TopicLabelling/cognitive-search-topic-labelling/notebooks/dev-bertopic-tutorial.ipynb](https://file+.vscode-resource.vscode-cdn.net/Users/cls/Documents/Work/Projects/Beiersdorf/SubProjects/CognitiveSearch/TopicLabelling/cognitive-search-topic-labelling/notebooks/dev-bertopic-tutorial.ipynb) Cell 12 line 1
----> [1](vscode-notebook-cell:/Users/cls/Documents/Work/Projects/Beiersdorf/SubProjects/CognitiveSearch/TopicLabelling/cognitive-search-topic-labelling/notebooks/dev-bertopic-tutorial.ipynb#Y100sZmlsZQ%3D%3D?line=0) import texthero

File [~/miniforge3/envs/bdf-cognitive-search-gpu/lib/python3.10/site-packages/texthero/__init__.py:6](https://file+.vscode-resource.vscode-cdn.net/Users/cls/Documents/Work/Projects/Beiersdorf/SubProjects/CognitiveSearch/TopicLabelling/cognitive-search-topic-labelling/notebooks/~/miniforge3/envs/bdf-cognitive-search-gpu/lib/python3.10/site-packages/texthero/__init__.py:6)
      1 """Texthero: python toolkit for text preprocessing, representation and visualization.
      2 
      3 
      4 
      5 """
----> 6 from . import preprocessing
      7 from .preprocessing import *
      9 from . import representation

File [~/miniforge3/envs/bdf-cognitive-search-gpu/lib/python3.10/site-packages/texthero/preprocessing.py:24](https://file+.vscode-resource.vscode-cdn.net/Users/cls/Documents/Work/Projects/Beiersdorf/SubProjects/CognitiveSearch/TopicLabelling/cognitive-search-topic-labelling/notebooks/~/miniforge3/envs/bdf-cognitive-search-gpu/lib/python3.10/site-packages/texthero/preprocessing.py:24)
     20 import warnings
     22 warnings.filterwarnings(action="ignore", category=UserWarning, module="gensim")
---> 24 from gensim.sklearn_api.phrases import PhrasesTransformer
     27 def fillna(input: pd.Series) -> pd.Series:
     28     """Replace not assigned values with empty spaces."""

ModuleNotFoundError: No module named 'gensim.sklearn_api'
➤ pip show gensim
Name: gensim
Version: 4.3.2
Summary: Python framework for fast Vector Space Modelling
Home-page: https://radimrehurek.com/gensim/
Author: Radim Rehurek
Author-email: me@radimrehurek.com
License: LGPL-2.1-only
Location: /Users/cls/miniforge3/envs/bdf-cognitive-search-gpu/lib/python3.10/site-packages
Requires: numpy, scipy, smart-open
Required-by: bpemb, flair, texthero, top2vec

texthero installed with:

pip install --upgrade texthero --only-binary=gensim

(compiling gensim failed, therefore only binary)

@pyacobellis
Copy link

Any work or update on this? I am facing same issue, affecting use of Top2Vec API (need latest version of gensim for ngram modelling).

@DanielOX
Copy link

same

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

3 participants