I’ve read some about how sys.executable() is different when you run a packaged application, so I’m sure that could be playing a role, but I have no idea how to fix that.
A library that tries to run Python subprocesses will cause a PyInstaller application to keep spawning itself because sys.executable points to your application rather than python.exe. There’s no universal magic fix for this. Sometimes you can configure a library not to use subprocesses. Sometimes the library uses Python’s multprocessing library for which you can enable PyInstaller’s special handling. In nastier cases, you can put a if sys.argv[1:3] == [whatever arguments the subprocess always uses]: do the task the subprocess was intended to do at the top of your code. If you can strip the problem down to one specific library and a small bit of code then share that, I should be able to give you a more precise workaround.
I’ve read some about how sys.executable() is different when you run a packaged application, so I’m sure that could be playing a role, but I have no idea how to fix that.
A library that tries to run Python subprocesses will cause a PyInstaller application to keep spawning itself because sys.executable points to your application rather than python.exe. There’s no universal magic fix for this. Sometimes you can configure a library not to use subprocesses. Sometimes the library uses Python’s multprocessing library for which you can enable PyInstaller’s special handling. In nastier cases, you can put a if sys.argv[1:3] == [whatever arguments the subprocess always uses]: do the task the subprocess was intended to do at the top of your code. If you can strip the problem down to one specific library and a small bit of code then share that, I should be able to give you a more precise workaround.
--
You received this message because you are subscribed to a topic in the Google Groups "PyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyinstaller/Z76GgQlCruY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/a3f0bcd5-07e2-40c6-8705-22a935d3b154n%40googlegroups.com.
That sounds like a red herring. It’s specifically subprocess.run([sys.executable, ...]) that we’re interested in — any other command should run fine under PyInstaller.
That sounds like a red herring. It’s specifically subprocess.run([sys.executable, ...]) that we’re interested in — any other command should run fine under PyInstaller.
--
You received this message because you are subscribed to a topic in the Google Groups "PyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyinstaller/Z76GgQlCruY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/cfa78206-b7d2-4e2e-8cfc-a29916b36ce7n%40googlegroups.com.
That sounds like a red herring. It’s specifically subprocess.run([sys.executable, ...]) that we’re interested in — any other command should run fine under PyInstaller.
--
You received this message because you are subscribed to a topic in the Google Groups "PyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyinstaller/Z76GgQlCruY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/CALGmxEJ7L0MzFa6OKxjopLfDVQurcXeG%2BT%2BQMFFT3rZc%3D25pFQ%40mail.gmail.com.