Search code examples
pythonimportmodulepip

Unable to install/uninstall with pip due to CryptographyDeprecationWarning


I get this warning when installing with both pip3 and pip

/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes

I've seen this post (I cant import any python modules, and cant install any modules with pip either), but upgrading cryptography doesn't work. Same warning come up.

I've tried pip -v and pip3 -v, they works fine. I've also reinstalled pip, but no magic happens.


Edit for future reference:
It correctly upgrade the module now after a few minutes, tho i'm still not sure why it took so long.


Solution

  • In order to solve this, install cryptography version 3.3.2

    pip install cryptography==3.3.2