Hi, all. There is a top level script, called SL_Launcher. This script may decide to launch another script, download_update as a subprocess: download_process = subprocess.Popen([path_to_downloader, ...args to download_update] ...args to subprocess) where path_to_downloader is the pyinstaller created executable in the same directory as the pyinstaller created executable of SL_Launcher. Inside download_update, it imports a module called InstallerUserMessage.py, which isolates all of the Tkinter handling for the various other modules. For test purposes, InstallerUserMessage has a main() that exercises the various methods. For the implementation of a progressbar, it imports Queue. When I run the main() method from InstallerUserMessage, it runs without error. However, when I run SL_Launcher.exe or just download_update.exe, I get: LOADER: Running SL_Launcher.py Traceback (most recent call last): File "SL_Launcher.py", line 30, in <module> import InstallerUserMessage File "c:\cygwin64\tmp\pip-build-xzzmth\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module File "InstallerUserMessage.py", line 33, in <module> import Queue ImportError: No module named Queue Failed to execute script SL_Launcher LOADER: OK. LOADER: Cleaning up Python interpreter. LOADER: Back to parent (RC: -1) LOADER: Doing cleanup LOADER: Freeing archive status for c:\Program Files (x86)\SecondLifeTestCoyotVMP\SL_Launcher.exe or LOADER: Running download_update.py Traceback (most recent call last): File "download_update.py", line 33, in <module> import os File "c:\cygwin64\tmp\pip-build-xzzmth\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module File "InstallerUserMessage.py", line 33, in <module> import Queue ImportError: No module named Queue Failed to execute script download_update LOADER: OK. LOADER: Cleaning up Python interpreter. LOADER: Back to parent (RC: -1) LOADER: Doing cleanup LOADER: Freeing archive status for c:\Program Files (x86)\SecondLifeTestCoyotVMP\download_update.exe The only other error output message is this: LOADER: Error activating the context: ActivateActCtx: An attempt to set the process default activation context failed because the process default activation context was already set. If I add import Queue to SL_Launcher (it is already in download_update), there is no problem with those import statements. If I reorder the import statements in InstallerUserMessage to put Queue at the end (I typically alphabetize them), it has no problem finding os, sys, threading, time, Tkinter, ttk, and webbrowser, and dies on Queue. By way of environment notes, Windows 7, Python 2.7.11 and pyinstaller 3.2. I am not using any custom spec files. This code works on Mac as Python scripts. Is there something I need to do to get pyinstaller to find Queue in an imported module? I find it curious and strange that it found all of other imports but not Queue. Best, coyot -- https://wiki.lindenlab.com/wiki/User:Coyot/Tao_of_Linden https://wiki.lindenlab.com/wiki/Shrek_Ears -- |
- [PyInstaller] Trouble getting pyinstaller to i... Coyot Linden (Glenn Glazer)
- [PyInstaller] Re: Trouble getting pyinsta... Coyot Linden (Glenn Glazer)
- [PyInstaller] Re: Trouble getting pyi... Coyot Linden (Glenn Glazer)
- Re: [PyInstaller] Re: Trouble getting... Steve Barnes
- Re: [PyInstaller] Re: Trouble get... Hartmut Goebel
- Re: [PyInstaller] Re: Trouble... Steve Barnes
- Re: [PyInstaller] Re: Tr... Coyot Linden (Glenn Glazer)
- Re: [PyInstaller] Re... Steve Barnes
- Re: [PyInstaller... Coyot Linden (Glenn Glazer)
- Re: [PyInstaller... Steve Barnes
- Re: [PyInstaller... Coyot Linden (Glenn Glazer)