QualCoder icon indicating copy to clipboard operation
QualCoder copied to clipboard

Failing to start on Linux Fedora 38 - Solved

Open ilippert opened this issue 2 years ago • 18 comments

Describe the bug Unfortunately, QualCoder does not start.

Desktop (please complete the following information):

  • Fedora Linux 38

Error message No module named 'vlc' No module named 'vlc' No module named 'vlc' No module named 'vlc' No module named 'vlc' No module named 'vlc' No module named 'vlc' No module named 'vlc' No module named 'vlc' qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" 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.

ilippert avatar May 12 '23 17:05 ilippert

Hmm. I wonder if this will fix on of the errors: sudo dnf install xcb-util*

I saw the suggestion here: https://stackoverflow.com/questions/68036484/qt6-qt-qpa-plugin-could-not-load-the-qt-platform-plugin xcb-in-even-thou

For the other try this: sudo dnf install qt-wayland

I dont have Fedora to test. But I read there are lots of this type of problem raised with qt5 and qt6 and wayland on Fedora

ccbogel avatar May 12 '23 22:05 ccbogel

Thanks a lot, yes, sudo is used for installing packages via dnf. I have both xcb-util and qt-wayland installed on the system.

as for the vlc module error, this might help: https://stackoverflow.com/questions/38265773/import-vlc-module-in-python

From https://unix.stackexchange.com/questions/598099/could-not-find-the-qt-platform-plugin-wayland I get Also set QT_QPA_PLATFORM=wayland;xcb if the application misbehaves in wayland

Might these pointers help?

ilippert avatar May 13 '23 09:05 ilippert

The VLC notification is not really an error, and can be ignored, QC should still run. I am presuming you do not have vlc installed. But you can try: python3 -m pip install python-vlc And if that works ok - add this to the Fedora set up shell script

ccbogel avatar May 13 '23 23:05 ccbogel

To start the program - I presume you use terminal to start qualcoder: e,g, like this: python3 -m qualcoder Can you set the environment variable when starting the program, like this:

QT_QPA_PLATFORM=wayland python3 -m qualcoder or set QT_QPA_PLATFORM=wayland python3 -m qualcoder

or

QT_QPA_PLATFORM=wayland;xcb python3 -m qualcoder

or set QT_QPA_PLATFORM=wayland;xcb python3 -m qualcoder

Please let me know

ccbogel avatar May 13 '23 23:05 ccbogel

Thanks, I comment below in detail.

QT_QPA_PLATFORM=wayland python3 -m qualcoder

results in

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

QT_QPA_PLATFORM=wayland;xcb python3 -m qualcoder

results in

bash: xcb: command not found...

So, I tried QT_QPA_PLATFORM=xcb python3 -m qualcoder and that results in

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.

ilippert avatar May 14 '23 13:05 ilippert

I had a similar issue, but rerunning install_fedora.sh after upgrading from F36 fixed the issue for me. I am getting the vlc messages though.

frukto avatar May 14 '23 13:05 frukto

I had a similar issue, but rerunning install_fedora.sh after upgrading from F36 fixed the issue for me. I am getting the vlc messages though.

python3 -m pip install python-vlc should do the work - at least it did for me. And I have now proposed it for the install_fedora.sh file via https://github.com/ccbogel/QualCoder/pull/795.

Could you check which xcb packages you have installed on your system?

ilippert avatar May 14 '23 13:05 ilippert

Let me know if you need more info.

$ dnf list --installed | grep xcb
libX11-xcb.x86_64                                    1.8.4-1.fc38                        @fedora                
libxcb.x86_64                                        1.13.1-11.fc38                      @fedora                
libxcb-devel.x86_64                                  1.13.1-11.fc38                      @fedora                
xcb-util.x86_64                                      0.4.1-2.fc38                        @fedora                
xcb-util-cursor.x86_64                               0.1.4-2.fc38                        @fedora                
xcb-util-image.x86_64                                0.4.1-2.fc38                        @fedora                
xcb-util-keysyms.x86_64                              0.4.1-2.fc38                        @fedora                
xcb-util-renderutil.x86_64                           0.3.10-2.fc38                       @fedora                
xcb-util-wm.x86_64                                   0.4.2-2.fc38                        @fedora      

And yes, python3 -m pip install python-vlc let the warinings disapear. Thx.

frukto avatar May 15 '23 19:05 frukto

The Fedora shell script has updated that line, thx ilippiert

ccbogel avatar May 15 '23 22:05 ccbogel

Let me know if you need more info.

Hmm, I also have all these packages installed. Will have to install a freh Fedora version and see whether QualCoder runs then.

ilippert avatar May 16 '23 09:05 ilippert

Hi, hmm, still problem, now with this trouble:

Traceback (most recent call last):
  File "/usr/local/bin/qualcoder", line 33, in <module>
    sys.exit(load_entry_point('Qualcoder==3.4', 'console_scripts', 'qualcoder')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/qualcoder", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.11/site-packages/Qualcoder-3.4-py3.11.egg/qualcoder/__main__.py", line 48, in <module>
    from PyQt6 import QtCore, QtGui, QtWidgets
ImportError: /lib64/libQt6Core.so.6: version `Qt_6_PRIVATE_API' not found (required by /usr/local/lib/python3.11/site-packages/PyQt6-6.5.1-py3.11-linux-x86_64.egg/PyQt6/QtCore.abi3.so)

Do you have any idea what is wrong here?

ilippert avatar Jul 02 '23 17:07 ilippert

I don't know why this is happening. It happened to me when I upgraded from one version of Ubuntu to the next. What I did was a complete re-install of the newer Ubuntu version. Then install all the python bits I needed, to make it work.

ccbogel avatar Jul 03 '23 00:07 ccbogel

Hi, hmm, still problem, now with this trouble:

Traceback (most recent call last):
  File "/usr/local/bin/qualcoder", line 33, in <module>
    sys.exit(load_entry_point('Qualcoder==3.4', 'console_scripts', 'qualcoder')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/qualcoder", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.11/site-packages/Qualcoder-3.4-py3.11.egg/qualcoder/__main__.py", line 48, in <module>
    from PyQt6 import QtCore, QtGui, QtWidgets
ImportError: /lib64/libQt6Core.so.6: version `Qt_6_PRIVATE_API' not found (required by /usr/local/lib/python3.11/site-packages/PyQt6-6.5.1-py3.11-linux-x86_64.egg/PyQt6/QtCore.abi3.so)

Do you have any odea what is wrong here?

Same here. Have you found any solutions?

bzwierz avatar Aug 06 '23 20:08 bzwierz

I don't know how to fix this in Fedora. I did have a similar issue when I upgraded Ubuntu. The solution for me was anew install of Ubuntu.

ccbogel avatar Aug 06 '23 22:08 ccbogel

Hmm, I reinstalled Fedora and that did not help.

ilippert avatar Aug 09 '23 11:08 ilippert

Now, following https://stackoverflow.com/questions/70677148/sudden-importerror-cannot-import-name-qtcore-from-pyqt5, as a normal user I executed python3 -m pip install --upgrade --force-reinstall PyQt6. Then reran the Qualcoder Fedora install script. Then it worked.

well, and before I ran sudo dnf install ffmpeg --allowerasing because the ffmpeg installation did not succeed.

ilippert avatar Aug 09 '23 12:08 ilippert

Oh that;s good. Thank you for solving the problem. I will leave this post here so others can see it. and I might add to the instructions also.

ccbogel avatar Aug 09 '23 21:08 ccbogel

Hi, I checked the issue and solution on another Fedora system, too. I confirm the https://github.com/ccbogel/QualCoder/issues/794#issuecomment-1671208703 solution:

  1. as a normal user, execute python3 -m pip install --upgrade --force-reinstall PyQt6.
  2. Then run the QualCoder Fedora install script.

ilippert avatar Aug 23 '23 07:08 ilippert

Closing as this is an old Fedora version

ccbogel avatar Jul 23 '25 10:07 ccbogel