I am trying to make my Python program executable using Pyinstaller. However, I am getting error: ModuleNotFoundError: No module named 'ctypes'. In my code, I import ctypes as "from ctypes import *".
After some digging, I found this website with a "potential" solution but it is not very clear. I have no idea what I should be doing next. If anyone understands what the error is or how to fix it, please help. Thanks a lot!
https://pyinstaller.readthedocs.io/en/stable/feature-notes.html
I got it working using cx_freeze. At first I still got the same error, but I fixed it by adding this line.
options={'build_exe': {'packages': ['ctypes', 'xml'], 'include_files': includefiles}}
The ctypes package has to be added in manually in the setup.py file for cx_freeze. I assume something similar needs to be done with the pyinstaller spec file.