After obfuscating the code and packaging it with PyInstaller, running the entry file throws an error:
Error: rich and cryptography modules are required to run this code. Please install them using pip install rich cryptography or using poetry add rich cryptography.
Then I tried packaging again with:
pyinstaller --onefile --hidden-import=rich --hidden-import=cryptography main.py
but the same error still occurred.