Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] How to use 'pyinstaller'?

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
User avatar
Debmann
Posts: 23
Joined: 2023-09-12 21:43
Has thanked: 1 time

[Solved] How to use 'pyinstaller'?

#1 Post by Debmann »

I created a program using qt5designer with python on Windows 10.
Now I am trying to figure out how to create an installable for Windows 10.

Should I use Windows or Linux to create the install application?

No way can I figure out how to use pyinstaller!
I have found pyinstaller instructions on the Internet but they are really confusing. :?

Is there an easy way to create installers?
Please take my migraine!!

Thanks in advance.
Last edited by Debmann on 2023-12-26 16:10, edited 1 time in total.

Aki
Global Moderator
Global Moderator
Posts: 2979
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 75 times
Been thanked: 407 times

Re: [Python] How to use 'pyinstaller'?

#2 Post by Aki »

Hello,
I created a program using qt5designer with python on Windows 10.
Now I am trying to figure out how to create an installable for Windows 10.
Some links that might be useful: If you are targeting Windows as a deployment platform, you probably don't need Debian GNU/Linux for that.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

User avatar
Debmann
Posts: 23
Joined: 2023-09-12 21:43
Has thanked: 1 time

Re: [Python] How to use 'pyinstaller'?

#3 Post by Debmann »

Thanks for the reply. I have made some progress. I'm sticking with Linux.
Without using qt5 with other programs all is okay.

Just trying to figure out how to use pyinstaller with qt5 designer.
Seems like the qt files somehow are not included in the pyinstaller run.

Thanks for the link I'll check them out.

User avatar
Debmann
Posts: 23
Joined: 2023-09-12 21:43
Has thanked: 1 time

Re: [Python] How to use 'pyinstaller'?

#4 Post by Debmann »

I have been successful using pyinstaller without any PyQt5 files. However with PyQt5 files no joy.
Below is my pyinstaller line ... does anyone see problems with it?
This command is executed in terminal in the directory containing the LECC files, other files I use the full path.

/home/harveywallbanger/.local/bin/pyinstaller --add-data="./LECCui.py;./LECC.ui;./LECC_Combined.ui;/usr/lib/python3/dist-packages/PyQt5/QtCore;/usr/lib/python3/dist-packages/PyQt5/QtWidgets:." LECCui.py

Aki
Global Moderator
Global Moderator
Posts: 2979
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 75 times
Been thanked: 407 times

Re: [Python] How to use 'pyinstaller'?

#5 Post by Aki »

Hello,
Is the source code of your program available to anyone is interested in helping you ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

User avatar
Debmann
Posts: 23
Joined: 2023-09-12 21:43
Has thanked: 1 time

Re: [Python] How to use 'pyinstaller'?

#6 Post by Debmann »

The help that I really need is how to make a program out of my project.
I suppose at some point in time I would share my code, but it's not pretty.

User avatar
Debmann
Posts: 23
Joined: 2023-09-12 21:43
Has thanked: 1 time

Re: [Python] How to use 'pyinstaller'?

#7 Post by Debmann »

After few sleepless nights and a few migraines I finally figured it out.

Aki
Global Moderator
Global Moderator
Posts: 2979
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 75 times
Been thanked: 407 times

Re: [Python] How to use 'pyinstaller'?

#8 Post by Aki »

Hello,
Debmann wrote: 2023-12-26 16:10 After few sleepless nights and a few migraines I finally figured it out.
I'm happy you sorted it out. Might you share the solution with other forum viewers ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

User avatar
Debmann
Posts: 23
Joined: 2023-09-12 21:43
Has thanked: 1 time

Re: [Solved] How to use 'pyinstaller'?

#9 Post by Debmann »

[path to]pyinstaller --onefile --add-data="test.ui:." --add-data="/usr/lib/python3/dist-packages/PyQt5/:." --name "test" test.py

the pyinstaller path can be different on the distro being used
use the path on the pyinstaller line or add it to the system $PATH

/home/mfcsdhahs/.local/bin/pyinstaller Mint
/root/.local/bin/pyinstaller MX

However I have not been able to use mypy and pyinstaller on Debian.
I cannot figure out how to install them on Debian.

UPDATED: corrected typing

Post Reply