-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setuptools 45.0.0 may cause PyInstaller 3.3 packaged executable fail to launch #1963
Comments
And virtualenv is broken: pypa/virtualenv#1493 It seems the impact is wider than imagined. |
Hm, maybe I'm wrong here, but I'm not sure why this particular failure mode would happen. Presumably if Also, you mention trying different versions of |
FWIW, I got this error also on the buildbot CI. it happen that I had pip pinned to < 19 because of pypa/pip#6163 (which has ben fixed since), but pyinstaller was latest pinning setuptools < 45 fixes the issue as per buildbot/buildbot@1ab0916 unpinning everything keeps the error. buildbot/buildbot@340bcf3
|
On another note, the Puppet package provider for pip packages also has problems with this warning. IMO it should have the option to disable the warning. |
We ran into the same issue this morning, using PyInstaller 3.6 |
Observed the same behaviour on
|
I am having the same issue with |
Fixed by forcing in a hook file the following submodule collection: ...
hiddenimports.extend(collect_submodules('pkg_resources')) |
Shall we get a new update today or what is the plan? |
Fixed by adding a hidden import:
|
Pin setuptools at 44.0.0 for now. pypa/setuptools#1963
Pin setuptools at 44.0.0 for now. pypa/setuptools#1963
…e with guidance on how to avoid the warning and what to do if that guidance was ineffective.
Is it possible for setuptools to provide a hook that would enable |
@jaraco what fix does Pyinstaller have for this? |
I was mistaken. I misread the references above and thought they were applied to Pyinstaller. |
How is it that other similar imports in
Here's how keyring adds a hook for hidden imports. Could someone with Pyinstaller expertise make a recommendation on what's the recommended approach here? |
My hack works whatever the version of setuptools. I’ll see if I have time to do a clean PR in here. |
Can also confirm this happens with later versions of PyInstaller (3.6) |
If you're using pyinstaller from bash you can use "--hidden-import='pkg_resources.py2_warn'" to get rid of this issue. Eg: pyinstaller --hidden-import='pkg_resources.py2_warn' ${package} |
Seems to be pypa/setuptools#1963
…tuptools Use version of setuptools that includes fix for pypa/setuptools#1963
I am getting his error while trying to convert my project exe file directroy with Auto-py-to-exe Running auto-py-to-exe v2.9.0 Building directory: C:\Users\Dell\AppData\Local\Temp\tmpan03u43h Provided command: pyinstaller --noconfirm --onedir --console --add-data "E:/Projects in Python/Drowsiness detection/alarm.wav;." --add-data "E:/Projects in Python/Drowsiness detection/model.py;." --add-data "E:/Projects in Python/Drowsiness detection/tkinter event.py;." --add-data "E:/Projects in Python/Drowsiness detection/models;models/" --add-data "E:/Projects in Python/Drowsiness detection/haar cascade files;haar cascade files/" "E:/Projects in Python/Drowsiness detection/drowsiness detection.py" Recursion Limit is set to 5000 Executing: pyinstaller --noconfirm --onedir --console --add-data E:/Projects in Python/Drowsiness detection/alarm.wav;. --add-data E:/Projects in Python/Drowsiness detection/model.py;. --add-data E:/Projects in Python/Drowsiness detection/tkinter event.py;. --add-data E:/Projects in Python/Drowsiness detection/models;models/ --add-data E:/Projects in Python/Drowsiness detection/haar cascade files;haar cascade files/ E:/Projects in Python/Drowsiness detection/drowsiness detection.py --distpath C:\Users\Dell\AppData\Local\Temp\tmpan03u43h\application --workpath C:\Users\Dell\AppData\Local\Temp\tmpan03u43h\build --specpath C:\Users\Dell\AppData\Local\Temp\tmpan03u43h 736467 INFO: PyInstaller: 4.3 736489 INFO: Python: 3.6.8rc1 736498 INFO: Platform: Windows-10-10.0.19041-SP0 736520 INFO: wrote C:\Users\Dell\AppData\Local\Temp\tmpan03u43h\drowsiness detection.spec 736653 INFO: UPX is not available. 736783 INFO: Extending PYTHONPATH with paths 744094 INFO: checking Analysis 744123 INFO: Building Analysis because Analysis-00.toc is non existent 744152 INFO: Initializing module dependency graph... 744198 INFO: Caching module graph hooks... 744302 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict. 744620 INFO: Analyzing base_library.zip ... 763780 INFO: Caching module dependency graph... 764287 INFO: running Analysis Analysis-00.toc 764398 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable 764756 INFO: Analyzing E:\Projects in Python\Drowsiness detection\drowsiness detection.py 766483 INFO: Processing pre-find module path hook distutils from 'c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'. 766558 INFO: distutils: retargeting to non-venv dir 'c:\users\dell\appdata\local\programs\python\python36\lib' 766839 INFO: Processing pre-find module path hook site from 'c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-site.py'. 766861 INFO: site: retargeting to fake-dir 'c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\fake-modules' 769115 INFO: Processing pre-safe import module hook six.moves from 'c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-six.moves.py'. 893728 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-urllib3.packages.six.moves.py'. 1408036 INFO: Processing module hooks... 1408057 INFO: Loading module hook 'hook-certifi.py' from 'c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 1408204 INFO: Loading module hook 'hook-cryptography.py' from 'c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... An error occurred while packaging Project output will not be moved to output folder Complete. |
In my specific example where we use PyInstaller 3.3 to package our application into an executable for deployment, the resulting executable cannot be launched after setuptools was updated from 44.0.0 to 45.0.0. This happened right at 9:00PM Pacific Time yesterday.
The error signature is (when launching the executable generated by PyInstaller):
PyInstaller version is 3.3, setuptools is 45.0.0
Working just fine with setuptools 44.0.0
For certain limitations in our Python application, we are stuck with Pyinstaller 3.3, but we are definitely looking into using later versions of PyInstaller.
The text was updated successfully, but these errors were encountered: