Skip to content

Instantly share code, notes, and snippets.

@Jazzis18
Last active October 6, 2017 04:39
Show Gist options
  • Save Jazzis18/1110be542945fd797c51fd9e34640eef to your computer and use it in GitHub Desktop.
Save Jazzis18/1110be542945fd797c51fd9e34640eef to your computer and use it in GitHub Desktop.
OSError: Cannot load native module 'Cryptodome.Cipher._raw_ecb'
  1. Make sure you have C:\Python34\Lib\site-packages\PyInstaller\hooks\hook-Cryptodome.py
  2. Go to C:\Python34\Lib\site-packages, and copy (sic!) Crypto module, and name it Cryptodome.
  3. Go to C:\Python34\Lib\site-packages\Crypto\Util\_raw_api.py, and rename imports from Crypto to Cryptodome. It should look like this:
from Cryptodome.Util.py3compat import byte_string
from Cryptodome.Util._file_system import pycryptodome_filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment