jbesomi/texthero

Can't get texthero to work with current versions of spacy and gensim

nkadochn opened this issue · 1 comments

I am having hard time resolving the dependencies with texthero. Looks like the current versions of Gensim and Spacy are incompatible with texthero

Gensim error: ModuleNotFoundError: No module named 'gensim.sklearn_api'
Spacy error: modulenotfounderror: no module named 'thinc.types'

Hey Nick @nkadochn , thank you for your message.

I update both Gensim and Spacy to the latest versions and tried to understand the issues. Here is what I discovered:

Gensim. Texthero supports Gensim version 3.8.3. Unfortunately, Gensim V4 is not backward compatible with V3 and moreover, the API completely changed for the Phrases module (Texthero is using it). Therefore, supporting V4 is not trivial. If you are willing to contribute, it would be great if you can adapt Texthero code to support both Gensim version 3 and version 4 (or, even better, remove completely Gensim dependency and implement the phrases algorithm directly).

Spacy. I tried to install Spacy latest version (3.2.0) and could import Texthero without issues. Which version of Spacy do you have and when do you encounter the Spacy error?

Also, pip install texthero should automatically install the right dependency version. Did you open this issue because you would like to use the latest version of both tools or just because you cannot make Texthero work?

Moreover, what are you working on with Texthero? To better decide what do to next, knowing what other people are working on is very useful. Thanks!