在Ubuntu上,可以使用PyInstaller來打包PyQt5應用程序。以下是打包應用程序的步驟:
pip install pyinstaller
pyi-makespec your_script.py
hiddenimports=['PyQt5']
pyinstaller your_script.spec
在完成上述步驟后,PyInstaller將會在dist目錄下生成打包后的應用程序??梢詫⒃搼贸绦蚍职l給其他用戶并在Ubuntu上運行。