Skip to content

ModuleNotFoundError: No module named 'Crypto' & ModuleNotFoundError: No module named 'json' #5938

Answered by rokm
hymancheng asked this question in Help
Discussion options

You must be logged in to vote

I use Cython to build MainWindow.py to MainWindow.pyd

PyInstaller cannot analyze pyd extensions and therefore cannot automatically pick up the imports made within them. So you'll have to add any imports made within your MainWindow.pyd (and not within any other .py file) to hiddenimports - in your case, that would be json and Crypto.Cipher (or perhaps Crypto.Cipher.AES).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hymancheng
Comment options

Answer selected by hymancheng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5936 on June 19, 2021 15:56.