'PyInstaller' works, but 'pyinstaller' does not?

120 views
Skip to first unread message

Ed May

unread,
Jul 6, 2023, 1:47:22 PM7/6/23
to PyInstaller
Hi, I am finding a weird bug (maybe?) and wondering what I am doing wrong, or if this is how PyInstaller is supposed to work?

- - -
Environment:
- MacOS Monterey, v12.5,1
- MacBook M1 2021 (ARM)

- - -
Building a super simple PyQt6 app just to test and understand the process. Everything works when run from my terminal when in development.
Screen Shot 2023-07-06 at 12.48.22 PM.png

- - -
When I go to use PyInstaller to build the app, if I run "pyinstaller app.py" from the terminal I do get a successful build, but if I then try and run the app I get a "segmentation fault" error right away:
Screen Shot 2023-07-06 at 12.50.37 PM.png

- - -
However, if I instead run "PyInstaller app.py" (uppercase instead of all lowercase), then I get a successful build and then the app runs as expected with no errors:
Screen Shot 2023-07-06 at 12.52.41 PM.png

- - -
- Is that the expected behavior?
- Should I be using "PyInstaller" instead of "pyinstaller" during all my builds? Following all the tutorials it seems the lower-case is the preferred for some reason?
- Is there something else I am doing wrong here that is causing the error?
- What would the difference between the upper-case and lower-case commands be?

I wonder if anyone has run into this type of behavior before?

thanks,
-Ed

Steve Barnes

unread,
Jul 6, 2023, 3:28:27 PM7/6/23
to pyins...@googlegroups.com

Ed,

 

One thing to check is how many copies pyinstaller you have and where they are. As Mac is case sensitive it is entirely possible that you have a pyinstaller and a Pyinstaller. The command `which -a pyinstaller Pyinstaller PyInstaller` should give you the path(s) to all of them.

 

You can also check:

   Pyinstaller –version

   pyinstaller –version

To see if they are both the same version number.

 

Hope that will help.

 

Steve

 

From: pyins...@googlegroups.com <pyins...@googlegroups.com> On Behalf Of Ed May
Sent: Thursday, July 6, 2023 6:00 PM
To: PyInstaller <pyins...@googlegroups.com>
Subject: [PyInstaller] 'PyInstaller' works, but 'pyinstaller' does not?

 

Hi, I am finding a weird bug (maybe?) and wondering what I am doing wrong, or if this is how PyInstaller is supposed to work?

 

- - -

Environment:

- MacOS Monterey, v12.5,1

- MacBook M1 2021 (ARM)

 

- - -

Building a super simple PyQt6 app just to test and understand the process. Everything works when run from my terminal when in development.

 

- - -

When I go to use PyInstaller to build the app, if I run "pyinstaller app.py" from the terminal I do get a successful build, but if I then try and run the app I get a "segmentation fault" error right away:

 

- - -

However, if I instead run "PyInstaller app.py" (uppercase instead of all lowercase), then I get a successful build and then the app runs as expected with no errors:

 

- - -

- Is that the expected behavior?

- Should I be using "PyInstaller" instead of "pyinstaller" during all my builds? Following all the tutorials it seems the lower-case is the preferred for some reason?

- Is there something else I am doing wrong here that is causing the error?

- What would the difference between the upper-case and lower-case commands be?

 

I wonder if anyone has run into this type of behavior before?

 

thanks,

-Ed

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/ff08ef37-6e24-4d58-ac81-1fb3b51d30ffn%40googlegroups.com.

Steve Barnes

unread,
Jul 6, 2023, 3:39:39 PM7/6/23
to pyins...@googlegroups.com

Actually the clue is in the screenshots:

Verses:

 

So one of your builds is using Python 3.10.7+PyInstaller 4.10 and the other is using Python 3.11.0+PyInstaller 5.13.0 (for some reason with a framework of 3.10 which is worrying.

 

All the best,

 

Steve

bwoodsend

unread,
Jul 6, 2023, 3:46:03 PM7/6/23
to PyInstaller

The executable is called pyinstaller (all lower case). macOS (and Windows) use case-insensitive file systems so I’d have thought that they’d be interchangeable but evidently not. Irregardless, you’ve got two different versions of PyInstaller there. If you run which PyInstaller, that should tell you where this mysterious PyInstaller command is coming from. As to why it’s segfaulting, it’s hard to tell because it could be a genuine segfault or it could be nonsense like macOS’s gatekeeper getting in the way. You could try pyinstaller --debug=all app.py then share the output of the application running (please copy/paste from the terminal instead of screenshotting) although my hopes aren’t high.

Chris Barker

unread,
Jul 6, 2023, 3:46:31 PM7/6/23
to pyins...@googlegroups.com
OS-X is really weird with case sensitivity of file names -- I *think* it's:

"case insensitive, but case preserving"

This can cause some strange behavior with software that doesn't expect this. For the most part, Python does "the right thing" by some definition of the right thing:

In [18]: list(here.iterdir())

Out[18]: [PosixPath('That'), PosixPath('this')]


In [19]: f = open('that')


In [20]: f

Out[20]: <_io.TextIOWrapper name='that' mode='r' encoding='UTF-8'>


In [21]: list(here.iterdir())

Out[21]: [PosixPath('That'), PosixPath('this')]


But I'm not surprised that you are having odd symptoms.

Ideally, PyQT and PyInstaller, and ... would all do the right thing here, but apparently not.

With a segfault, it's pretty hard to tell where the issue is, but if I had to guess, it's with PyQT and a shared lib, but ???

 If you're having issues, and you find a cased version that works -- go for it :-)

-CHB


--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/ff08ef37-6e24-4d58-ac81-1fb3b51d30ffn%40googlegroups.com.


--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov

bwoodsend

unread,
Jul 7, 2023, 4:03:33 AM7/7/23
to PyInstaller

It turns out that segfaulting on macOS with PyQt6==6.5.1 is a known issue. It was fixed in e3ad7c71c7f8acd79e73ae2ca13db18ecfc354d1 but that hasn’t been released yet so for now I suggest using pip install pyqt6==6.5 pyqt6-qt6==6.5.

Ed May

unread,
Jul 11, 2023, 2:47:40 AM7/11/23
to PyInstaller
Thanks everyone: that is super helpful - thank you for all the suggestions and for the recommendations - I definitely was not paying attention to the versions issues there, but you are absolutely right that the version discrepancies must be the difference in the behavior?

That is very, very weird about the python 3.11 --> 3.10 behavior? I will keep a careful eye on that from now on? I can't image how/why that happened? I do have multiple python version installed on my computer of course, but I has assumed the venv would always be the environment being used...  Perhaps I will just do some uninstalling of the old versions and try and reduce the variables here.

in any event - this gives me enough to work with - thank you!
-Ed
Reply all
Reply to author
Forward
0 new messages