Comments (5)
Try to adapt your setup to use zip_include_packages like in our pyside2 sample:
https://github.com/marcelotduarte/cx_Freeze/blob/main/samples/pyside2/setup.py#L54
from cx_freeze.
Thank you for your response. I now can build the .app and .dmg file after added zip_include_packages. But the app does not start. I tried to run it from inside of the package on console. It ends with this error:
❯ pwd
xxxxxx/cx-freeze-test/build/cx-freeze test.app/Contents/MacOS
❯ ./main
Traceback (most recent call last):
File "/Users/<user-name>/workplace/Work/selfWorks/cx-freeze-test/venv/lib/python3.10/site-packages/cx_Freeze/initscripts/__startup__.py", line 124, in run
module_init.run(name + "__main__")
File "/Users/<user-name>/workplace/Work/selfWorks/cx-freeze-test/venv/lib/python3.10/site-packages/cx_Freeze/initscripts/console.py", line 16, in run
exec(code, module_main.__dict__)
File "main.py", line 11, in <module>
ImportError: dlopen(/Users/<user-name>/workplace/Work/selfWorks/cx-freeze-test/build/cx-freeze test.app/Contents/MacOS/lib/PySide2/QtWidgets.abi3.so, 0x0002): Library not loaded: @rpath/QtWidgets.framework/Versions/5/QtWidgets
Referenced from: <C6F1FFFF-9D14-37F5-A9A2-0ABBB917DDAC> /Users/<user-name>/workplace/Work/selfWorks/cx-freeze-test/build/cx-freeze test.app/Contents/Resources/lib/PySide2/QtWidgets.abi3.so
Reason: tried: '/Users/<user-name>/workplace/Work/selfWorks/cx-freeze-test/build/cx-freeze test.app/Contents/Resources/lib/PySide2/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/wangyuan/workplace/Work/selfWorks/cx-freeze-test/build/cx-freeze test.app/Contents/Resources/lib/PySide2/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/wangyuan/workplace/Work/selfWorks/cx-freeze-test/build/cx-freeze test.app/Contents/Resources/lib/PySide2/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/wangyuan/workplace/Work/selfWorks/cx-freeze-test/build/cx-freeze test.app/Contents/Resources/lib/PySide2/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/wangyuan/workplace/Work/selfWorks/cx-freeze-test/build/cx-freeze test.app/Contents/MacOS/lib/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Library/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Library/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file, not in dyld cache)
I also cloned the cx_Freeze repo and tried the PySide2 sample, I got a similar error.
❯ ./test_pyside2
Traceback (most recent call last):
File "/Users/<user-name>/workplace/Work/selfWorks/cx_Freeze/venv/lib/python3.10/site-packages/cx_Freeze/initscripts/__startup__.py", line 124, in run
module_init.run(name + "__main__")
File "/Users/<user-name>/workplace/Work/selfWorks/cx_Freeze/venv/lib/python3.10/site-packages/cx_Freeze/initscripts/console.py", line 16, in run
exec(code, module_main.__dict__)
File "test_pyside2.py", line 7, in <module>
ImportError: dlopen(/Users/<user-name>/workplace/Work/selfWorks/cx_Freeze/samples/pyside2/build/simple_PySide2-0.5.app/Contents/MacOS/lib/PySide2/QtCore.abi3.so, 0x0002): Library not loaded: @rpath/QtCore.framework/Versions/5/QtCore
Referenced from: <33B37FBA-9774-3F27-9496-B46CCDAC6A98> /Users/<user-name>/workplace/Work/selfWorks/cx_Freeze/samples/pyside2/build/simple_PySide2-0.5.app/Contents/Resources/lib/PySide2/QtCore.abi3.so
Reason: tried: '/Users/<user-name>/workplace/Work/selfWorks/cx_Freeze/samples/pyside2/build/simple_PySide2-0.5.app/Contents/Resources/lib/PySide2/QtCore.framework/Versions/5/QtCore' (no such file), '/Users/wangyuan/workplace/Work/selfWorks/cx_Freeze/samples/pyside2/build/simple_PySide2-0.5.app/Contents/Resources/lib/PySide2/Qt/lib/QtCore.framework/Versions/5/QtCore' (no such file), '/Users/wangyuan/workplace/Work/selfWorks/cx_Freeze/samples/pyside2/build/simple_PySide2-0.5.app/Contents/Resources/lib/PySide2/QtCore.framework/Versions/5/QtCore' (no such file), '/Users/wangyuan/workplace/Work/selfWorks/cx_Freeze/samples/pyside2/build/simple_PySide2-0.5.app/Contents/Resources/lib/PySide2/Qt/lib/QtCore.framework/Versions/5/QtCore' (no such file), '/Users/wangyuan/workplace/Work/selfWorks/cx_Freeze/samples/pyside2/build/simple_PySide2-0.5.app/Contents/MacOS/lib/QtCore.framework/Versions/5/QtCore' (no such file), '/Library/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file), '/System/Library/Frameworks/QtCore.framework/Versions/5/QtCore' (no such file, not in dyld cache)
I tried on python 3.10.12 and python 3.8.18. Both have the same error. Could you help me on this?
I have updated the minimal reproducing project.
from cx_freeze.
The pyside2 sample was tested in CI (py38-3.10, macos 11.7) and tested using homebrew python 3.10 macos 11.0 recently (about 2 weeks ago), using cx_Freeze 6.15.10.
Please test with the cx_Freeze 6.15.10.
from cx_freeze.
I tested with the cx_Freeze 6.15.10 and it works both the sample and my minimal project! Thank you for your help!
But I still hope you can fix this problem in the future versions so I can update the version.
from cx_freeze.
Release 6.15.12 is out!
from cx_freeze.
Related Issues (20)
- cx_Freeze with torch.multiprocessing using wrong source in child processes HOT 31
- ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. HOT 4
- Error message: no base named 'console' ('console-cpython-311-win_amd64') for python 3.11 HOT 25
- Reducing the Size of PyTorch-Based Executable HOT 1
- partially initialized module 'PyQt5' has no attribute 'QtCore' HOT 5
- PyGObject hook broke in 7.1.0 HOT 4
- cxfeeze example references non-existent CLI option
- PyQt6 import error in cx_Freeze 7.1, missing DLL HOT 1
- Version 7.1.0 (and 7.1.0.post0) break FastAPI/hypercorn HOT 7
- Multiprocessing Manager Class Causes Infinite Loop on Mac OS (intel) HOT 18
- Building with pyproject.toml does not include local package HOT 3
- Windows Service cannot find required configuration files after creating .exe using cx_Freeze HOT 11
- Extend DMG functionality by using an external library HOT 1
- Error while building Qt6 sample on MacOSX HOT 12
- MKL hook trigger an error during setup HOT 3
- possible regression? cx_freeze 6.16 - 7.1 for possibly scipy HOT 19
- Could not Find Module vcomp140.dll HOT 2
- numpy 2.0 support added
- test_cli.py::test_import_tomli FAILS: "ImportError: No module named setuptools.extern" HOT 4
- Request additional time when stopping a windows service
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cx_freeze.