How to use with Pyinstaller #1589
Replies: 3 comments 1 reply
-
I believe @Mstpyt may be able to help with this. I have not used pyinstaller personally. |
Beta Was this translation helpful? Give feedback.
-
I worked with that: pyinstaller --onefile --noconsole YourstartExecutable.py --name=YourName But most of the time i use Nuitka now: os.system(f"python -m nuitka --mingw64 --onefile "
f"--windows-icon-from-ico=../res/images/logo_small_icon_only_inverted.ico "
f"--plugin-enable=numpy "
f"--enable-plugin=anti-bloat "
f"--noinclude-pytest-mode=nofollow "
f"--noinclude-setuptools-mode=nofollow "
f"--plugin-enable=pylint-warnings "
f"--plugin-enable=tk-inter "
f"--windows-disable-console "
f"../main.pyw")
```
Important to know, you have to copy your resources like images, fonts etc. with your folder into the .exe folder, otherwise you will crash your app |
Beta Was this translation helpful? Give feedback.
-
For those still experiencing issues, make sure PyInstaller is running from the correct virtual environment. In my case, PyInstaller was installed globally, while Activate your virtual environment before running PyInstaller, and ensure that PyInstaller is also installed within that environment. To verify, run |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm having some trouble trying to use DPG with Pyinstaller. I can create the executable, but upon running it I get a ModuleNotFound error.
The code works if I just run it with
python test.py
. Note I am in a venv.Beta Was this translation helpful? Give feedback.
All reactions