- Saved searches
- Use saved searches to filter your results more quickly
- This issue was moved to a discussion.
- PyInstaller not packaging Python Library (dlopen -> image not found). #2047
- PyInstaller not packaging Python Library (dlopen -> image not found). #2047
- Comments
- Saved searches
- Use saved searches to filter your results more quickly
- This issue was moved to a discussion.
- PyInstaller not packaging Python Library (dlopen -> image not found). #2047
- PyInstaller not packaging Python Library (dlopen -> image not found). #2047
- Comments
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
PyInstaller not packaging Python Library (dlopen -> image not found). #2047
PyInstaller not packaging Python Library (dlopen -> image not found). #2047
Comments
I’ve packaged a sample flask app using PyInstaller but my OSX executable fails to run and shows the following executable,
Error loading Python lib '/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python': dlopen(/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python, 10): image not found
My guess is that PyInstaller is not packaging Python with my app. Here’s what I ran,
$ pyinstaller hello_flask.spec --onedir 83 INFO: PyInstaller: 3.2 83 INFO: Python: 3.4.3 87 INFO: Platform: Darwin-13.4.0-x86_64-i386-64bit 89 INFO: UPX is not available. 90 INFO: Extending PYTHONPATH with paths ['/Users/ahmed/Code/play/py-install-tut', '/Users/ahmed/Code/play/py-install-tut'] 90 INFO: checking Analysis 99 INFO: checking PYZ 104 INFO: checking PKG 105 INFO: Building because toc changed 105 INFO: Building PKG (CArchive) out00-PKG.pkg 144 INFO: Bootloader /opt/boxen/pyenv/versions/3.4.3/Python.framework/Versions/3.4/lib/python3.4/site-packages/PyInstaller/bootloader/Darwin-64bit/run_d 144 INFO: checking EXE 145 INFO: Building because toc changed 145 INFO: Building EXE from out00-EXE.toc 145 INFO: Appending archive to EXE /Users/ahmed/Code/play/py-install-tut/build/hello_flask/hello_flask 155 INFO: Fixing EXE for code signing /Users/ahmed/Code/play/py-install-tut/build/hello_flask/hello_flask 164 INFO: checking COLLECT WARNING: The output directory "/Users/ahmed/Code/play/py-install-tut/dist/hello_flask" and ALL ITS CONTENTS will be REMOVED! Continue? (y/n)y 1591 INFO: Removing dir /Users/ahmed/Code/play/py-install-tut/dist/hello_flask 1597 INFO: Building COLLECT out00-COLLECT.toc 2203 INFO: checking BUNDLE WARNING: The output directory "/Users/ahmed/Code/play/py-install-tut/dist/myscript.app" and ALL ITS CONTENTS will be REMOVED! Continue? (y/n)y 3947 INFO: Removing dir /Users/ahmed/Code/play/py-install-tut/dist/myscript.app 3948 INFO: Building BUNDLE out00-BUNDLE.toc 3972 INFO: moving BUNDLE data files to Resource directory
When I open the contents of the packaged app in OSX I get the following files,
myscript.app/Contents/MacOS/ _struct.cpython-34m.so hello_flask zlib.cpython-34m.so
When I double click the above hello_flask executable I get the following output in my terminal,
/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask ; exit; PyInstaller Bootloader 3.x LOADER: executable is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask LOADER: homepath is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS LOADER: _MEIPASS2 is NULL LOADER: archivename is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask LOADER: Extracting binaries LOADER: Executing self as child LOADER: set _MEIPASS2 to /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS PyInstaller Bootloader 3.x LOADER: executable is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask LOADER: homepath is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS LOADER: _MEIPASS2 is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS LOADER: archivename is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask LOADER: Already in the child - running user's code. LOADER: Python library: /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python Error loading Python lib '/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python': dlopen(/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python, 10): image not found LOADER: Back to parent (RC: 255) LOADER: Doing cleanup LOADER: Freeing archive status for /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask [Process completed]
I’ve also tried running this on a co-workers mac OSX and I get the same issue.
The text was updated successfully, but these errors were encountered:
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
PyInstaller not packaging Python Library (dlopen -> image not found). #2047
PyInstaller not packaging Python Library (dlopen -> image not found). #2047
Comments
I’ve packaged a sample flask app using PyInstaller but my OSX executable fails to run and shows the following executable,
Error loading Python lib '/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python': dlopen(/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python, 10): image not found
My guess is that PyInstaller is not packaging Python with my app. Here’s what I ran,
$ pyinstaller hello_flask.spec --onedir 83 INFO: PyInstaller: 3.2 83 INFO: Python: 3.4.3 87 INFO: Platform: Darwin-13.4.0-x86_64-i386-64bit 89 INFO: UPX is not available. 90 INFO: Extending PYTHONPATH with paths ['/Users/ahmed/Code/play/py-install-tut', '/Users/ahmed/Code/play/py-install-tut'] 90 INFO: checking Analysis 99 INFO: checking PYZ 104 INFO: checking PKG 105 INFO: Building because toc changed 105 INFO: Building PKG (CArchive) out00-PKG.pkg 144 INFO: Bootloader /opt/boxen/pyenv/versions/3.4.3/Python.framework/Versions/3.4/lib/python3.4/site-packages/PyInstaller/bootloader/Darwin-64bit/run_d 144 INFO: checking EXE 145 INFO: Building because toc changed 145 INFO: Building EXE from out00-EXE.toc 145 INFO: Appending archive to EXE /Users/ahmed/Code/play/py-install-tut/build/hello_flask/hello_flask 155 INFO: Fixing EXE for code signing /Users/ahmed/Code/play/py-install-tut/build/hello_flask/hello_flask 164 INFO: checking COLLECT WARNING: The output directory "/Users/ahmed/Code/play/py-install-tut/dist/hello_flask" and ALL ITS CONTENTS will be REMOVED! Continue? (y/n)y 1591 INFO: Removing dir /Users/ahmed/Code/play/py-install-tut/dist/hello_flask 1597 INFO: Building COLLECT out00-COLLECT.toc 2203 INFO: checking BUNDLE WARNING: The output directory "/Users/ahmed/Code/play/py-install-tut/dist/myscript.app" and ALL ITS CONTENTS will be REMOVED! Continue? (y/n)y 3947 INFO: Removing dir /Users/ahmed/Code/play/py-install-tut/dist/myscript.app 3948 INFO: Building BUNDLE out00-BUNDLE.toc 3972 INFO: moving BUNDLE data files to Resource directory
When I open the contents of the packaged app in OSX I get the following files,
myscript.app/Contents/MacOS/ _struct.cpython-34m.so hello_flask zlib.cpython-34m.so
When I double click the above hello_flask executable I get the following output in my terminal,
/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask ; exit; PyInstaller Bootloader 3.x LOADER: executable is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask LOADER: homepath is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS LOADER: _MEIPASS2 is NULL LOADER: archivename is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask LOADER: Extracting binaries LOADER: Executing self as child LOADER: set _MEIPASS2 to /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS PyInstaller Bootloader 3.x LOADER: executable is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask LOADER: homepath is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS LOADER: _MEIPASS2 is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS LOADER: archivename is /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask LOADER: Already in the child - running user's code. LOADER: Python library: /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python Error loading Python lib '/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python': dlopen(/Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/Python, 10): image not found LOADER: Back to parent (RC: 255) LOADER: Doing cleanup LOADER: Freeing archive status for /Users/ahmed/Code/play/py-install-tut/dist/myscript.app/Contents/MacOS/hello_flask [Process completed]
I’ve also tried running this on a co-workers mac OSX and I get the same issue.
The text was updated successfully, but these errors were encountered: