How do you resolve: PySide2/designer: symbol lookup error: ... : undefined symbol: _ZdlPvm, version Qt_5?

On Ubuntu 22.04, using Python 3.10.4, I've setup PyCharm community edition 2022.01 to use PySide2 designer (Qt) as an external tool. When I press the "create" button this error is produced and the process terminates. Similar reports in last 6 years and 6 months didn't work for me and PySide2 requires a special patch to work with Python3.10.4.

In PyCharm external tool QtDesigner5, program venv_dir/bin/pyside2-designer, working directory $ProjectFileDir$. I've set checkboxes Synchronize files after execution and Open console for tool output.

As additional info. PySide2 was built from 5.15.2 Qt maintenance tool sources and has pyside-setup branch set to 5.15. All traces of pyside2 and shiboken2 had previously been safely removed from Ubuntu system, as they cause numerous errors. One change was applied to sources: (thanks Petr Viktorin 2022-01-21 16:46:48 UTC). Clean 'bdist_wheel' and 'install'. This does not affect PySide6 (6.3.0), which works without any issue.

1

1 Answer

I observed that the date on the 'designer' binary was Nov 8, 2021 and, unlike PySide6, PySide2 did not appear to completely rebuild qttools, which includes 'designer'. Once I locally built 'designer' from Qt maintenance tool source 'Qt/5.15.2/Src/qttools', setting Qt build environment to 5.15, using qmake qttools.pro,make -j4 and installed locally in 'Qt/5.15.2/gcc_64/bin/designer the error message went away and 'designer' functioned as expected. I think the error message may have been caused by some sort of C++ compiler setting differences. Also, for some reason PySide2 unlike PySide6 builds in site-packages of the same name does not include a Qt folder that has lib, libexec, plugins, qml, resources, and translations folders. Maybe a compatibility legacy since both packages are built from different branches of pyside-setup.

For PySide2 Settings in PyCharm external tool QtDesigner5, program Qt/5.15.2/gcc_64/bin/designer, working directory $ProjectFileDir$. I've set checkboxes Synchronize files after execution and Open console for tool output.

Slightly different for PySide6. In PyCharm external tool QtDesigner6,(using my Python3.10.4 venv virtual environment) program venv_dir/bin/pyside6-designer, working directory $ProjectFileDir$. I've set checkboxes Synchronize files after execution and Open console for tool output.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like