That’s strange! All that Prodigy really does here is the following:
try:
from gensim.models import Word2Vec
except ImportError:
# raise that error
Does this work for you if you import it manually?
Alternatively, you can also just edit the source of recipes/terms.py, find Word2Vec = get_word2vec() and replac that with a direct call to Gensim’s Word2Vec. This might make it a little easier to debug what’s going on?
The error message from Prodigy somehow hides the underlying reason from the user. I first only tried to manually import gensim, which worked fine. But running from gensim.models import Word2Vec gave me the error that this package is missing.
Thanks for getting to the bottom of this. This is weird, but good to know!
And yeah, Prodigy does the pretty standard import check, so it’ll capture any ImportError raised by the module. I’m not sure if there’s something we can do to prevent this, but we could of course update the error message to include a note like “If you already have Gensim installed, try running from gensim.models import Word2Vec and see what happens” etc.