Giter VIP home page Giter VIP logo

Comments (5)

marcelotduarte avatar marcelotduarte commented on July 16, 2024

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.

programus avatar programus commented on July 16, 2024

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.

marcelotduarte avatar marcelotduarte commented on July 16, 2024

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.

programus avatar programus commented on July 16, 2024

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.

marcelotduarte avatar marcelotduarte commented on July 16, 2024

Release 6.15.12 is out!

from cx_freeze.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.