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
Unable to build executable using embedded zip Python #4989
Comments
I manually adjusted
I found that it's related to PR #4182 and issue #4181. As mentioned in the PR, this issue was not actually fixed as filesystem operations are still used, even if Python is embedded in a zip file. Furthermore, as shown in this reply, it's unfortunately not as simple as only addressing the filesystem operations. |
@Ruud-K this is indeed a bug. I shall fix this in the next few days before the next release. |
Hi, is there any temporary o manual workaround to bypass error using embedded python? |
@menteora nope - sorry this got buried. I'll do this next - it's now top of my to-do list. |
@Ruud-K Do you still have the changes you made to get PyInstaller to handle the zipped libs? The |
I ran into similar issues when using pyinstaller with embedded python3.7.9. The solution was to use the |
This seems to be a long-running issue and the content of
I have a naive suggestion here: maybe we can consider using embeddable python.zip directly as base_library.zip? Otherwise we might ends up updating Also configuring embeddable python alone is already a demanding task and I need to thank the creator of this post https://dev.to/fpim/setting-up-python-s-windows-embeddable-distribution-properly-1081 |
I'll work on this to fix the bug right away |
I successfully generated the exe file through an ad hoc solution like this: in the embeddable python, there is a pythonxx .zip of the package, extract the package and rename it to the pyhonxx.zip folder, and run the pyinstaller again. Witness the miracle. |
still |
No definitive solution? In my case it appears: |
Description of the issue
The official Python embeddable zip file distributions for Windows from Python.org contain a zip file (pythonXX.zip) that contains the pre-compiled and optimized .pyc files to run Python isolated on a machine. I've installed the embedded Python on a local agent that we use in our azure devops pipeline, following the Microsoft docs.
However, building on this agent using PyInstaller fails, see Stacktrace below. This failure occurs because the requirements for
base_library.zip
are located inside a zip. Thus, PyInstaller tries to do anos.stat()
on a path inside a zip folder, which fails.Context information (for bug reports)
pyinstaller --version
:3.6
A minimal example program which shows the error
helloworld.py
helloworld.py
using any settings.Stacktrace / full error message
The text was updated successfully, but these errors were encountered: