Nuitka: PySide6 build issue - FATAL: Error, failed to find path @rpath/libshiboken6.abi3.6.5.dylib

Hello!

As per the title we are trying to build our PySide6 application in standalone and or onefile mode (we have tried both individually and together).

NOTES: Running with neither option DOES NOT give us our PySide6 error BUT it does give us an almost exact existing error relating to scipy.optimize._highs (https://github.com/Nuitka/Nuitka/issues/1242). Please let me know if you want the full traceback from this issue and I can make a new issue for you

We have uninstalled PySide2 as we were running on that previously so there should be no conflicts.

// Ben

Below is a list of info on the system and versions of modules we are running:

Our build module currently:

import nuitka
import subprocess

entry_point = "/Users/benhearn/Documents/project/main.py"

internal_modules = ["core", "music_tag", "tools", "ui", "utils"]

nuitka_command = [
    "python", "-m", "nuitka",
    #"--standalone",
    "--follow-imports",
    "--remove-output",
    "--enable-plugin=pyside6",
    #"--enable-plugin=numpy",
    "--output-dir=nuitka_dist",
    "--macos-create-app-bundle",
    "--onefile"
]
for module in internal_modules:
    nuitka_command.extend(["--include-module={}".format(module)])
nuitka_command.extend([
    "--windows-disable-console",
    #"--windows-icon-from-ico=etrax/icons/app_logo.ico",
    entry_point,
])

subprocess.check_call(nuitka_command)

Nuitka, python flavor, system etc:

1.5.7 Commercial: None Python: 3.9.16 (main, Dec 7 2022, 10:15:43) Flavor: Homebrew Python Executable: /Users/benhearn/Documents/etrax/venv_py39/bin/python OS: Darwin Arch: x86_64 Version C compiler: /usr/bin/clang (clang).

How did you install Nuitka and Python

Using “pip install nuitka” inside a PyCharm initialised virtual environment (I believe it is using the built in venv for this setup): https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html

The specific PyPI names and versions

altgraph==0.17 blessings==1.7 certifi==2022.12.7 cffi==1.15.0 chardet==4.0.0 charset-normalizer==3.0.1 Cython==0.29.27 ftfy==6.0.3 ftransc==7.0.3 helpdev==0.7.1 idna==3.4 joblib==1.0.1 lxml==4.6.5 macholib==1.14 music-tag==0.4.3 mutagen==1.45.1 Nuitka==1.5.7 numpy==1.24.3 ordered-set==4.1.0 packaging==21.3 pafy==0.5.5 plumbum==1.7.0 pycparser==2.20 pyinstaller==5.6.2 pyinstaller-hooks-contrib==2022.13 pyparsing==3.0.7 PySide6==6.5.0 PySide6-Addons==6.5.0 PySide6-Essentials==6.5.0 python-vlc==3.0.16120 pyuca==1.2 QDarkStyle==3.1 QtPy==2.0.1 requests==2.28.2 scikit-learn==0.24.1 scipy==1.10.1 shiboken2==5.15.2.1 shiboken6==6.5.0 six==1.15.0 sklearn==0.0 SoundFile==0.10.3.post1 sparse-dot-topn==0.2.9 threadpoolctl==3.1.0 timeloop==1.0.2 urllib3==1.26.14 wcwidth==0.2.5 youtube-dl==2021.12.17 zstandard==0.21.0

Our entire build output from Nuitka up until the error with PySide6 shiboken:

python /Users/benhearn/Documents/project/build/nuitka_build_new.py
Nuitka-Options:INFO: Used command line options: --follow-imports --remove-output --enable-plugin=pyside6 --output-dir=nuitka_dist --macos-create-app-bundle --onefile --include-module=core --include-module=music_tag --include-module=tools --include-module=ui --include-module=utils --windows-disable-console /Users/benhearn/Documents/project/main.py
Nuitka-Options:INFO: Following all imports is the default for onefile mode and need not be specified.
Nuitka:WARNING: For GUI applications, you ought to specify an icon with '--macos-app-icon'.", otherwise a dock icon may not be present.
Nuitka:INFO: Starting Python compilation with Nuitka '1.5.7' on Python '3.9' commercial grade 'not installed'.
Nuitka-Plugins:INFO: implicit-imports: Injecting post-module load code for module 'PySide6.QtCore':
Nuitka-Plugins:INFO: implicit-imports:     According to Yaml configuration.
Nuitka-Plugins:INFO: pyside6: Injecting post-module load code for module 'PySide6.QtCore':
Nuitka-Plugins:INFO: pyside6:     Setting Qt library path to distribution folder. We need to avoid loading target
Nuitka-Plugins:INFO: pyside6:     system Qt plugins, which may be from another Qt version.
Nuitka-Plugins:INFO: pkg-resources: Injecting post-module load code for module 'pkg_resources':
Nuitka-Plugins:INFO: pkg-resources:     Registering Nuitka loader with "pkg_resources".
Nuitka-Plugins:INFO: multiprocessing: Injecting pre-module load code for module 'multiprocessing':
Nuitka-Plugins:INFO: multiprocessing:     Monkey patching "multiprocessing" load environment.
Nuitka-Plugins:INFO: multiprocessing: Injecting post-module load code for module 'multiprocessing':
Nuitka-Plugins:INFO: multiprocessing:     Monkey patching "multiprocessing" for compiled methods.
Nuitka-Plugins:INFO: pyside6: Unwanted import of 'PySide2' that conflicts with 'PySide6' encountered, preventing its inclusion. As a result an "ImportError" might be given at run time. Uninstall the module it for fully compatible behavior with the uncompiled code.
Nuitka:INFO: Completed Python level compilation and optimization.                                                
Nuitka:INFO: Generating source code for C backend compiler.
Nuitka:INFO: Running data composer tool for optimal constant value handling.                                                 
Nuitka:INFO: Running C compilation via Scons.
Nuitka-Scons:INFO: Backend C compiler: clang (clang).
Nuitka-Scons:INFO: Backend linking program with 960 files (no progress information available).
Nuitka-Scons:INFO: Compiled 960 C files using ccache.
Nuitka-Scons:INFO: Cached C files (using ccache) with result 'cache hit': 960
Nuitka-Plugins:INFO: data-files: Included data file 'certifi/cacert.pem' due to package data for 'certifi'.
Nuitka-Plugins:INFO: pyside6: Including Qt plugins 'iconengines,imageformats,platforms,styles,tls' below 'PySide6/qt-plugins'.
Nuitka-Plugins:INFO: dll-files: Found 1 file DLLs from soundfile installation.
FATAL: Error, failed to find path @rpath/libshiboken6.abi3.6.5.dylib (resolved DLL to /Users/benhearn/Documents/project/venv_py39/lib/python3.9/site-packages/PySide6/libshiboken6.abi3.6.5.dylib) for /Users/benhearn/Documents/project/venv_py39/lib/python3.9/site-packages/PySide6/QtCore.abi3.so, please report the bug.
Traceback (most recent call last):
  File "/Users/benhearn/Documents/project/build/nuitka_build_new.py", line 30, in <module>
    subprocess.check_call(nuitka_command)
  File "/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', '-m', 'nuitka', '--follow-imports', '--remove-output', '--enable-plugin=pyside6', '--output-dir=nuitka_dist', '--macos-create-app-bundle', '--onefile', '--include-module=core', '--include-module=music_tag', '--include-module=tools', '--include-module=ui', '--include-module=utils', '--windows-disable-console', '/Users/benhearn/Documents/project/main.py']' returned non-zero exit status 1.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 16 (9 by maintainers)

Most upvoted comments

@ben-hearn-sb : you just post the code in the issue. In most cases, a minimal program contains only few lines. FWIW, a minimal reproducer is a program with as few dependencies and as little code as possible which still exhibits your problem. One thing to realize is that the program does not need to do anything useful any more. In most cases, the resulting program is less than a few dozen lines and in many cases a few lines are enough. I usually create these reproducers in an iterative way: strip down the parts of the code of the original program which seem unrelated to the error, test if the error is still there, repeat until you cannot remove anything more. This is a time-consuming process but it is usually the price to pay to get your issue fixed.

I didn’t find the time yet, no, other issues have priority currently.

Confirmed issue is gone in factory with shiboken. Also confirmed SQL driver issue present in factory and release. Will make an issue

@dryarullin is there a built release for me to test against, I downgraded to 1.5.6 and the issue went away however another issue pertaining to QSQL popped up and I am unsure if that is fixed in the factory branch also, I dont want to make a bug report when I dont have to.

For transparency the 1.5.6 QSQL bug: FATAL: Error, failed to find path /usr/local/opt/libiodbc/lib/libiodbc.2.dylib (resolved DLL to /usr/local/opt/libiodbc/lib/libiodbc.2.dylib) for /Users/benhearn/Documents/etrax/venv_py39/lib/python3.9/site-packages/PySide6/Qt/plugins/sqldrivers/libqsqlodbc.dylib, please report the bug.

Please read: https://nuitka.net/doc/factory.html