user25453231
user25453231

Reputation: 1

Not able to install gensim

Code:

import nltk
import numpy as np
import re


import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer


from scipy.sparse.linalg import svds


from gensim.summarization.summarizer import summarize

from summarizer import Summarizer

error: No module named 'gensim.summarization

type here

I tried to install it using !pip install but didn't worked at all

Upvotes: -4

Views: 67

Answers (1)

Crashdown
Crashdown

Reputation: 166

Check your gensim version. Is it 4.x? You can find it out by using pip freeze in your environment.

Please check this question and answer. gensim.summarization submodule is deprecated and removed in 4+ gensim versions (wiki page).

You can try alternative packages, or, if you really want to use gensim.summarization, downgrade to lower versions (3.x should be fine).

Upvotes: 1

Related Questions