You are not logged in.

#1 2019-07-09 06:34:45

zaxdan69
Member
Registered: 2016-06-04
Posts: 301

[SOLVED]Application fail to start with Python 3.7 relocation error

I'm using a python application which starts at login and is minimized to system tray. At some point yesterday I realized that the application was crashed. I did a system update some hours before. When I tried to start the application from terminal I get this error:

/usr/bin/python3.7: relocation error: /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5: symbol _ZN20QPlatformIntegration11screenAddedEP15QPlatformScreenb version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference

Tried again but with " export QT_DEBUG_PLUGINS=1" before and I get this:

QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqminimal.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqminimalegl.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqoffscreen.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqvnc.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-egl.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-generic.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("wayland")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-egl"
        ]
    },
    "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-glx"
        ]
    },
    "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwebgl.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwebgl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "webgl"
        ]
    },
    "className": "QWebGLIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("webgl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 330497
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so"
loaded library "Xcursor"
python3: relocation error: /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5: symbol _ZN20QPlatformIntegration11screenAddedEP15QPlatformScreenb version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference

Any idea how to fix this?

Last edited by zaxdan69 (2019-07-09 14:34:35)

Offline

#2 2019-07-09 06:58:01

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,198

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

zaxdan69 wrote:

Any idea how to fix this?

Yes, stop installing stuff as root with pip (or similar). Uninstall the pip pyqt5 and install the package from the official Arch repositories.

Offline

#3 2019-07-09 07:19:07

zaxdan69
Member
Registered: 2016-06-04
Posts: 301

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

I did it but still I get this error.

Offline

#4 2019-07-09 07:25:20

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,198

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

There's no way that you can get the same error after uninstalling pip's PyQt, if you do it means you didn't uninstall it properly and still have some leftovers lying around.

Offline

#5 2019-07-09 07:45:40

zaxdan69
Member
Registered: 2016-06-04
Posts: 301

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

Can you please tell my how to do it?
I did:
pip uninstall pyqt5 -> and I get permission errors
sudo pip uninstall pyqt5 -> successfully uninstalled pyqt5
pip list -> doesn't show pyqt5, so is uninstalled
Then running the app I get the error:

ModuleNotFoundError: No module named 'PyQt5.QtGui'

Then uninstall and reinstall python-pyqt5
Then I reinsstall python-pyqt5
Then running the app again get similar xcb error:

QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

And after that when I run "pip list", pyqt5(v. 5.13.0) again listed as installed

Offline

#6 2019-07-09 08:07:24

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,198

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

Post the output of

ls -R /usr/lib/python3.7/site-packages/PyQt5/Qt
env | grep QT
pacman -Qkk python-pyqt5

Offline

#7 2019-07-09 08:43:10

zaxdan69
Member
Registered: 2016-06-04
Posts: 301

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

ls -R /usr/lib/python3.7/site-packages/PyQt5/Qt output:

/usr/lib/python3.7/site-packages/PyQt5/Qt:
lib  plugins  qml

/usr/lib/python3.7/site-packages/PyQt5/Qt/lib:
libqxcb.so

/usr/lib/python3.7/site-packages/PyQt5/Qt/plugins:

/usr/lib/python3.7/site-packages/PyQt5/Qt/qml:
Qt  QtQuick

/usr/lib/python3.7/site-packages/PyQt5/Qt/qml/Qt:
labs

/usr/lib/python3.7/site-packages/PyQt5/Qt/qml/Qt/labs:

/usr/lib/python3.7/site-packages/PyQt5/Qt/qml/QtQuick:

env | grep QT output:

QT_DEBUG_PLUGINS=1

pacman -Qkk python-pyqt5 output:

warning: python-pyqt5: /usr/bin (Mismatch UID)
warning: python-pyqt5: /usr/bin (Mismatch GID)
warning: python-pyqt5: /usr/share (Mismatch UID)
warning: python-pyqt5: /usr/share (Mismatch GID)
python-pyqt5: 207 total files, 2 modified files

Offline

#8 2019-07-09 11:25:40

seth
Member
Registered: 2012-09-03
Posts: 63,917

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

pacman -Qo /usr/lib/python3.7/site-packages/PyQt5/Qt/lib/libqxcb.so
stat /usr/lib/qt/plugins/platforms/libqxcb.so
pacman -Qikk qt5-base

Since "a python application"™ might still pollute QT_PLUGIN_PATH - what exactly is"a python application"™?

Online

#9 2019-07-09 13:09:14

zaxdan69
Member
Registered: 2016-06-04
Posts: 301

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

pacman Qq output:

error: the /usr/lib/python3.7/site-packages/PyQt5/Qt/lib/libqxcb.so doesn't belong to any package

stat output:

File: /usr/lib/qt/plugins/platforms/libqxcb.so
  Size: 18248     	Blocks: 40         IO Block: 4096   κανονικό αρχείο
Device: 836h/2102d	Inode: 1063453     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-07-09 14:11:46.000000000 +0300
Modify: 2019-07-01 15:32:07.000000000 +0300
Change: 2019-07-09 14:11:46.008877730 +0300
 Birth: 2019-07-09 14:11:46.008877730 +0300

pacman -Qikk output:

Name            : qt5-base
Version         : 5.13.0-7
Description     : A cross-platform application and UI framework
Architecture    : x86_64
URL             : https://www.qt.io
Licenses        : GPL3  LGPL3  FDL  custom
Groups          : qt  qt5
Provides        : None
Depends On      : libjpeg-turbo  xcb-util-keysyms  xcb-util-renderutil  libgl  fontconfig  xdg-utils
                  shared-mime-info  xcb-util-wm  libxrender  libxi  sqlite  xcb-util-image  mesa  tslib  libinput
                  libxkbcommon-x11  libproxy  libcups  double-conversion
Optional Deps   : qt5-svg: to use SVG icon themes [installed]
                  qt5-translations: for some native UI translations [installed]
                  postgresql-libs: PostgreSQL driver
                  mariadb-libs: MariaDB driver [installed]
                  unixodbc: ODBC driver
                  libfbclient: Firebird/iBase driver [installed]
                  freetds: MS SQL driver
                  gtk3: GTK platform plugin [installed]
Required By     : 2048-qt  airwave-git  android-file-transfer  appstream-qt  attica  avidemux-qt  bluez-qt
                  breeze-gtk  clementine  colorcode  glogg  karchive  kcalcore  kcodecs  kconfig  kcoreaddons
                  kdnssd  kholidays  kitemmodels  kitemviews  kjs  kwayland  kwidgetsaddons  libaccounts-qt
                  libdbusmenu-qt5  liblastfm-qt5  libmygpo-qt5  mame  modemmanager-qt  networkmanager-qt
                  phonon-qt5  polkit-qt5  poppler-qt5  prison  pyqt5-common  qbittorrent  qca  qdirstat  qgpgme
                  qt5-charts  qt5-connectivity  qt5-datavis3d  qt5-declarative  qt5-doc  qt5-imageformats
                  qt5-multimedia  qt5-networkauth  qt5-remoteobjects  qt5-script  qt5-sensors  qt5-styleplugins
                  qt5-svg  qt5-tools  qt5-translations  qt5-x11extras  qt5-xcb-private-headers  qt5-xmlpatterns
                  quazip  radeon-profile-daemon-git  radeon-profile-git  retroarch  rosegarden  sayonara-player
                  signond  solid  sonnet  syntax-highlighting  telegram-desktop  telegram-qt  telepathy-qt
                  threadweaver  virtualbox  vlc
Optional For    : avahi  avidemux-cli  cmake  graphviz  libde265  openal  pinentry  suil  v4l-utils
Conflicts With  : qtchooser
Replaces        : None
Installed Size  : 60.43 MiB
Packager        : Antonio Rojas <arojas@archlinux.org>
Build Date      : Mon 01 Jul 2019 03:32:07 PM EEST
Install Date    : Tue 09 Jul 2019 02:11:46 PM EEST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

warning: qt5-base: /usr/bin (UID mismatch)
warning: qt5-base: /usr/bin (GID mismatch)
warning: qt5-base: /usr/share (UID mismatch)
warning: qt5-base: /usr/share (GID mismatch)
warning: qt5-base: /usr/share/doc (UID mismatch)
warning: qt5-base: /usr/share/doc (GID mismatch)
qt5-base: 3664 total files, 3 altered files

Offline

#10 2019-07-09 13:13:56

seth
Member
Registered: 2012-09-03
Posts: 63,917

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

Move "/usr/lib/python3.7/site-packages/PyQt5/Qt/lib/libqxcb.so" away.

What happened to the system dirs?

ls -l /usr
seth wrote:

Since "a python application"™ might still pollute QT_PLUGIN_PATH - what exactly is"a python application"™?

Online

#11 2019-07-09 13:21:47

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

seth wrote:

Move "/usr/lib/python3.7/site-packages/PyQt5/Qt/lib/libqxcb.so" away.

The whole "Qt" directory should not be there I think:

$ CUTF pacman -Fqo /usr/lib/python3.7/site-packages/PyQt5/
extra/python-pyqt5
extra/python-pyqtwebengine
extra/python-qscintilla-qt5
extra/python-sip-pyqt5
community/qgis
$  CUTF pacman -Fqo /usr/lib/python3.7/site-packages/PyQt5/Qt/
$ 

Last edited by progandy (2019-07-09 13:22:11)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#12 2019-07-09 13:26:40

zaxdan69
Member
Registered: 2016-06-04
Posts: 301

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

I already removed it.

ls output:

drwxr-xr-x   6 archuser users 176128 Jul  9 14:15  bin
drwxr-xr-x   5 root      root    4096 Jul 14  2018  i686-w64-mingw32
drwxr-xr-x 708 root      root   69632 Jul  9 12:46  include
drwxr-xr-x 354 root      root  315392 Jul  9 16:03  lib
drwxr-xr-x  42 root      root   53248 Jul  8 18:47  lib32
lrwxrwxrwx   1 root      root       3 May 23 17:18  lib64 -> lib
drwxr-xr-x   2 root      root    4096 Jun 26 16:27  libexec
drwxr-xr-x   2 root      root    4096 Sep 12  2018 'Lib\site-packages\PyQt4\plugins\designer\python'
drwxr-xr-x  11 root      root    4096 Sep 30  2015  local
lrwxrwxrwx   1 root      root       3 May 23 17:18  sbin -> bin
drwxr-xr-x 528 archuser users  20480 Jul  8 20:41  share
drwxr-xr-x   5 root      root    4096 Jul  8 18:48  src
drwxr-xr-x   5 root      root    4096 Jul 14  2018  x86_64-w64-mingw32

The application is one I've created before a year(was a java application and I recreated in pyqt5). I have 2 more apps which also don't run with same error. All worked fine until yesterday. And worked also on linux mind which I used until 2-3 weeks ago before switch to arch linux.

Offline

#13 2019-07-09 13:48:36

zaxdan69
Member
Registered: 2016-06-04
Posts: 301

Re: [SOLVED]Application fail to start with Python 3.7 relocation error

You have right. I rename all PyQt5 directory and reinstall python-pyqt5. The new PyQt5 folder doesn't have Qt directory. It didn't change anythingh though. Still the apps don't run.
Now I have a different error:

File "./snoozeShutdown.py", line 2, in <module>
    from ui import mainwindow
  File "/home/archzaxus/pysnoozeshutdown/ui/mainwindow.py", line 8, in <module>
    from PyQt5.QtGui import QFont
ModuleNotFoundError: No module named 'PyQt5.sip'

Then I reinstalled python-sip-pyqt5, and now the application started, but translation doesn't work! This is progress though.
Thanks.

EDIT:
Translation works too. Kind of, because I always have problems with qyqt's translation implementation which doesn't updated, but this is unrelated with the current issue which seems that is fixed.
Thanks for your kind help!

Last edited by zaxdan69 (2019-07-09 15:14:29)

Offline

Board footer

Powered by FluxBB