Giter VIP home page Giter VIP logo

Comments (5)

marcelotduarte avatar marcelotduarte commented on June 30, 2024

Use zip_include_packages:
https://github.com/marcelotduarte/cx_Freeze/blob/main/samples/pyqt5/setup.py#L33

from cx_freeze.

programmeddeath1 avatar programmeddeath1 commented on June 30, 2024

I cloned the repo and built the pyqt5 example using python3 setup,py build.

I then ran the test_pqt5 it gives me the same partially initialized error.

The PyQT i am using is the default PyQT5 installed at the system level in ubuntu 22.

Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5 as pt
>>> pt.__path__
['/usr/lib/python3/dist-packages/PyQt5']

Could this be what is causing the conflict or issue? I am running ubuntu 22 on a orange pi sbc board. The pyqt app opens normally if i do python3 test_pyqt5.py.

Edit 1
I tried the same sample on my amd laptop too, its giving the same error, so it should not be a device or OS issue.

from cx_freeze.

marcelotduarte avatar marcelotduarte commented on June 30, 2024

I use a virtualenv and install cx_Freeze and pyqt5 using pip (see also README).
I do not test with system pytq5. I test it using conda-forge too.

from cx_freeze.

programmeddeath1 avatar programmeddeath1 commented on June 30, 2024

I have to use the system PyQt5 package because, on my sbc, the PyQT5 package cannot be installed through pip. It needs to be built from source.

Is it feasible to make cx_freeze use the system pip package? if so can you tell me the steps, else i assume I will have to try with a source build which currently doesnt seem feasible.

from cx_freeze.

marcelotduarte avatar marcelotduarte commented on June 30, 2024

The program 'main_qthread_docker.py' runs in Python?
python3 main_qthread_docker.py
works?
I installed pyqt5-dev (sudo apt install pyqt5-dev)
And tried:

$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5 as pt
>>> pt.__path__
_NamespacePath(['/usr/lib/python3/dist-packages/PyQt5'])
>>> 
$ python3 samples/pyqt5/test_pyqt5.py 
Traceback (most recent call last):
  File "/home/marcelo/github/cx_Freeze/samples/pyqt5/test_pyqt5.py", line 5, in <module>
    from PyQt5.QtCore import Qt
ModuleNotFoundError: No module named 'PyQt5.QtCore'

So the sample did not work with system python. This works w/ pyqt5 from pypi.
Do I need more packages than pyqt5-dev?

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.