I am importing gensim and get the following error after pip installing it:
219: CryptographyDeprecationWarning: Blowfish has been deprecated "class": algorithms.Blowfish,
How can I correct the situation?
pip install gensim and then imported:
!pip install gensim
import gensim
Gensim doesn't ever use the
Blowfishencryption algorithm, and there are no references tocryptography.Blowfishinside the Gensim project's code, so this error is likely triggered from some other package that it transitively pulls in as one of its requirements.You'd have to edit your question to show the entire error message (with all surrounding lines of 'traceback' & other details) – which is always a good idea when asking for help! – to give a better idea of what's really causing the message.
But also: 'deprecation' just means the creators of some code want to signal a feature is older & may go away entirely in the future, so beware relying on its indefinitely continuing functionality. And, a 'warning' doesn't mean an error or failure.
Often, such messages can be safely ignored, especially if:
Are you using Blowfish?
Are you creating software which will be distributed to others, with a support commitment that it will keep working even as the underlying libraries change arbitrarily?
If the answer to one or both of these is 'no', you likely don't have to worry about this deprecation warning. If seeing it bothers you or your users, it is possible to suppress the display of specific uninteresting warnings – see answers at: How to disable Python warnings?
But, be careful about hiding warnings in an overbroad fashion – someday there might be a warning about some functionality that you do rely on, and will want to adjust your code.