Closed Aggelos11 closed 3 months ago
Modules are imported dynamically so pyinstaller cannot follow them.
Here are some ways to do it:
Ugly way (Linux only), imports manually all modules
pyinstaller --additional-hooks-dir=. -F --onefile \
--hidden-import=lazagne.softwares.mails.clawsmail \
--hidden-import=lazagne.softwares.mails.thunderbird \
--hidden-import=lazagne.softwares.databases.dbvis \
--hidden-import=lazagne.softwares.sysadmin.env_variable \
--hidden-import=lazagne.softwares.sysadmin.apachedirectorystudio \
--hidden-import=lazagne.softwares.sysadmin.filezilla \
--hidden-import=lazagne.softwares.sysadmin.fstab \
--hidden-import=lazagne.softwares.browsers.opera \
--hidden-import=lazagne.softwares.chats.pidgin \
--hidden-import=lazagne.softwares.chats.psi \
--hidden-import=lazagne.softwares.sysadmin.shadow \
--hidden-import=lazagne.softwares.sysadmin.aws \
--hidden-import=lazagne.softwares.sysadmin.docker \
--hidden-import=lazagne.softwares.sysadmin.rclone \
--hidden-import=lazagne.softwares.sysadmin.ssh \
--hidden-import=lazagne.softwares.sysadmin.cli \
--hidden-import=lazagne.softwares.sysadmin.gftp \
--hidden-import=lazagne.softwares.sysadmin.keepassconfig \
--hidden-import=lazagne.softwares.sysadmin.grub \
--hidden-import=lazagne.softwares.databases.sqldeveloper \
--hidden-import=lazagne.softwares.databases.squirrel \
--hidden-import=lazagne.softwares.wifi.wifi \
--hidden-import=lazagne.softwares.wifi.wpa_supplicant \
--hidden-import=lazagne.softwares.wallet.kde \
--hidden-import=lazagne.softwares.wallet.libsecret \
--hidden-import=lazagne.softwares.memory.mimipy \
--hidden-import=lazagne.softwares.git.gitforlinux \
--hidden-import=lazagne.softwares.browsers.chromium_based \
laZagne.py
Otherwise the best way is using hooks like so:
pyinstaller --additional-hooks-dir=. -F --onefile laZagne.py
Or if you prefer using Nuitka instead of pyinstaller:
python3 -m nuitka --standalone --onefile --include-package=lazagne laZagne.py
I do pyinstaller —onefile Zalagne.py and it is compiled successfully . However when I try to run it with ./Lazagne all I get the following error :
![IMG_8450](https://github.com/AlessandroZ/LaZagne/assets/62383412/4f1d020a-6bd8-4d8f-a013-3265eb26a01c)