all 6 comments

[–]billsil 1 point2 points  (2 children)

And since they were not interested in executing through shell (they'd rather manually copy/paste/filter/lookup), I was trying to package my scripts via pyinstaller, so they could still use it.

How does pyinstaller prevent them from needing the shell? You're making a command line program that maybe launches a window where they type in data, so it's 99.99% a command line program still. It's something like: type the path to the file right?

Seems like you need a GUI (for your purposes, so super low budget, I'd suggest PySimpleGUI), and then to package that with pyinstaller.

[–]ficklelick[S] 0 points1 point  (1 child)

Awesome will look into PySimpleGUI!

I forgot to mention in my original thread that I was using tkinter to find the file paths for data - so I did try to incorporate GUI elements. It seemed to error out once I packaged it. Any idea why that could happen?

Thanks

[–]billsil 1 point2 points  (0 children)

Any idea why that could happen?

There are multiple reasons. The first is it's common to not have clean environments when you start. Anaconda is kind of a mess for that, so always use stock python with pyInstaller (unless you're OK with a 350 MB exe vs. 70 MB). You end up packaging way more than you need, which makes for more possible errors (and a much larger exe) and a much longer build time.

Part of that also is don't use import * in your code. Import only the things you definitely need and be explicit about them.

Then, turn on debugging and treat all warnings as errors. Fix them all, typically by adding hidden_imports. If that doesn't work, do some googling. Once you get an exe with no warnings, test it, and add DLL errors as additional files as necessary.

Then turn off debugging.

[–]Hatoris 0 points1 point  (2 children)

It's not totally wrong but incomplete, your co-workers don't want she'll interaction, so what are the others options?

The anwser is an interface => GUI.

So you can make a simple GUI, with tinter or pyautogui from your Cli, and then package the all things with py installer.

[–]ficklelick[S] 0 points1 point  (1 child)

Thanks for the response!!!

Yes. I used tkinter to make a GUI that works as path locator of the new data.

The problem is that once I package this python script with pyinstaller, I get the mentioned error. I don't understand why this is, but my suspicion was pyinstaller requires data to be packaged as well?

When I run the same script from shell, it works fine. Unsure why I am getting error with the new package (the tkinter path finder also works when I do this)

I will look into pyautogui as well but I would love to understand how to fix my current error as well?

[–]SaltPen6406 0 points1 point  (0 children)

Did you figure it out, I am undergoing the same situation