AttributeError: module 'Crypto.PublicKey.RSA' has no attribute 'import_key' I solved this problem by pip install pycryptodome