datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

Fresh pip install currently not working; pinning PySide version resolves the problem #426

Closed mslw closed 1 year ago

mslw commented 1 year ago

A fresh installation from pypi in a virtual environment (pip install datalad-gooey) under Python 3.9 does not launch gooey:

❱ datalad gooey
/home/mszczepanik/.virtualenvs/tmp-680484541f9d130/bin/python: symbol lookup error: /home/mszczepanik/.virtualenvs/tmp-680484541f9d130/lib/python3.9/site-packages/PySide6/Qt/plugins/platforms/../../lib/libQt6WaylandClient.so.6: undefined symbol: wl_proxy_marshal_flags

I had no luck searching for the particular error message.

This is a list of packages that got installed ``` ❱ pip list Package Version ------------------ -------- annexremote 1.6.0 boto 2.49.0 certifi 2023.5.7 cffi 1.15.1 chardet 5.1.0 charset-normalizer 3.1.0 cryptography 41.0.1 darkdetect 0.7.1 datalad 0.18.5 datalad-gooey 0.2.0 datalad-next 0.6.3 distro 1.8.0 fasteners 0.18 humanize 4.6.0 idna 3.4 importlib-metadata 6.6.0 iso8601 2.0.0 jaraco.classes 3.2.3 jeepney 0.8.0 keyring 23.13.1 keyrings.alt 4.2.0 littleutils 0.2.2 looseversion 1.2.0 more-itertools 9.1.0 msgpack 1.0.5 outdated 0.2.2 packaging 23.1 patool 1.12 pip 23.1.2 platformdirs 3.5.3 pycparser 2.21 pyqtdarktheme 2.1.0 PySide6 6.5.1.1 PySide6-Addons 6.5.1.1 PySide6-Essentials 6.5.1.1 python-gitlab 3.15.0 requests 2.31.0 requests-toolbelt 1.0.0 SecretStorage 3.3.3 setuptools 67.7.2 shiboken6 6.5.1.1 tqdm 4.65.0 typing_extensions 4.6.3 urllib3 2.0.3 wheel 0.40.0 www-authenticate 0.9.2 zipp 3.15.0 ```

Gooey launches without issues when installing PySide first, going down one minor version (another fresh virtualenv):

❱ pip install PySide6==6.4.3 datalad-gooey
A list of packages in this working case ``` ❱ pip list Package Version ------------------ -------- annexremote 1.6.0 boto 2.49.0 certifi 2023.5.7 cffi 1.15.1 chardet 5.1.0 charset-normalizer 3.1.0 cryptography 41.0.1 darkdetect 0.7.1 datalad 0.18.5 datalad-gooey 0.2.0 datalad-next 0.6.3 distro 1.8.0 fasteners 0.18 humanize 4.6.0 idna 3.4 importlib-metadata 6.6.0 iso8601 2.0.0 jaraco.classes 3.2.3 jeepney 0.8.0 keyring 23.13.1 keyrings.alt 4.2.0 littleutils 0.2.2 looseversion 1.2.0 more-itertools 9.1.0 msgpack 1.0.5 outdated 0.2.2 packaging 23.1 patool 1.12 pip 23.1.2 platformdirs 3.5.3 pycparser 2.21 pyqtdarktheme 2.1.0 PySide6 6.4.3 PySide6-Addons 6.4.3 PySide6-Essentials 6.4.3 python-gitlab 3.15.0 requests 2.31.0 requests-toolbelt 1.0.0 SecretStorage 3.3.3 setuptools 67.7.2 shiboken6 6.4.3 tqdm 4.65.0 typing_extensions 4.6.3 urllib3 2.0.3 wheel 0.40.0 www-authenticate 0.9.2 zipp 3.15.0 ```

We should either look into what causes this error (whether it's on our side) or consider pinning PySide6 version until resolved.


edit: editable install from current main has the same problem unless PySide6 version is pinned

edit2: PySide6 v6.5.0 also works, it seems to be specific to 6.5.1 / 6.5.1.1

mslw commented 1 year ago

Note: this is Wayland-specific. With PySide 6.5.1.1, Gooey can be launched with QT_QPA_PLATFORM=xcb datalad gooey or when running GNOME on Xorg.

In any case, this seems to be down to libraries bundled (?) with PySide 6.5.1. A minimal reproducer is:

>>> from PySide6 import QtWidgets
>>> app = QtWidgets.QApplication([])
python: symbol lookup error: /home/mszczepanik/.virtualenvs/tmp-7221555b76939f3/lib/python3.9/site-packages/PySide6/Qt/plugins/platforms/../../lib/libQt6WaylandClient.so.6: undefined symbol: wl_proxy_marshal_flags
mslw commented 1 year ago

Interestingly, the problem is gone after upgrading to Debian 12 (bookworm) and Python 3.11 that comes with it.