I have been trying to load texthero into python but keep getting this error. I have already upgraded the gensim module.
Error
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-24-0692be95f55a> in <module>()
----> 1 import texthero as hero
2 import pandas as pd
1 frames
/usr/local/lib/python3.7/dist-packages/texthero/preprocessing.py in <module>()
22 warnings.filterwarnings(action="ignore", category=UserWarning, module="gensim")
23
---> 24 from gensim.sklearn_api.phrases import PhrasesTransformer
25
26
ModuleNotFoundError: No module named 'gensim.sklearn_api'
Seems like a potential conflict with a newer version of gensim
, in my case 4.0.1.
pip install "gensim==3.8.1"
solved this for me.