I am trying to generate an executable from a python script using pyinstaller
. For this I am executing the following command:
pyinstaller --onefile --paths /path/to/venv/lib/python3.9/site-packages \
--paths /path/to/venv/lib64/python3.9/site-packagesscript.py
It generates an executable but when trying to execute it, it gives me an error:
OSError: Cannot load native module 'Crypto.Cipher._raw_ecb': Not found '_raw_ecb.cpython-39-x86_64-linux-gnu.so', Not found '_raw_ecb.abi3.so', Not found '_raw_ecb.so'
When executing
pyinstaller --onefile myscript.py
on my Windows 10 machine, everything works fine. On my Fedora machine, however, I get thus error.
How can I prevent this from happening?
EDIT
sys.path
gives the following result:
['', '/usr/lib64/python39.zip', '/usr/lib64/python3.9', '/usr/lib64/python3.9/lib-dynload', '/home/user/.virtualenvs/venv/lib64/python3.9/site-packages', '/home/user/.virtualenvs/venv/lib/python3.9/site-packages']