jchanvfx / NodeGraphQt

Node graph framework that can be re-implemented into applications that supports PySide2
http://chantonic.com/NodeGraphQt/
MIT License
1.29k stars 266 forks source link

Distribution with `PyInstaller` / `Nuitka` #204

Open tamasmuncsan opened 3 years ago

tamasmuncsan commented 3 years ago

I'm using v0.1.1 of NodeGraphQt in my app.

I've tried to make an executable out of my source code using Pyinstaller / Nuitka, but both of them give the following error after running the build executable:

Nuitka:

Traceback (most recent call last):
  File "main.py", line 2, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "main.dist/NodeGraphQt/__init__.py", line 77, in <module NodeGraphQt>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "Qt.py", line 1919, in <module Qt>
  File "Qt.py", line 1897, in _install
AttributeError: partially initialized module 'Qt' has no attribute 'QtGui' (most likely due to a circular import)

PyInstaller:

Traceback (most recent call last):
  File "main.py", line 2, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller/loader/pyimod03_importers.py", line 531, in exec_module
  File "NodeGraphQt/__init__.py", line 77, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller/loader/pyimod03_importers.py", line 531, in exec_module
  File "Qt.py", line 1919, in <module>
  File "Qt.py", line 1897, in _install
AttributeError: partially initialized module 'Qt' has no attribute 'QtGui' (most likely due to a circular import)
[74601] Failed to execute script main

Any help would be appreciated, maybe I am missing some hidden import...

dangerstudios commented 2 years ago

Try this, worked for me: https://github.com/brentvollebregt/auto-py-to-exe