Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to start on Linux Fedora 38 - Solved #794

Open
ilippert opened this issue May 12, 2023 · 18 comments
Open

Failing to start on Linux Fedora 38 - Solved #794

ilippert opened this issue May 12, 2023 · 18 comments
Labels
Solved Solution to problem shown

Comments

@ilippert
Copy link
Contributor

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.

@ccbogel
Copy link
Owner

ccbogel commented May 12, 2023

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

@ilippert
Copy link
Contributor Author

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?

@ccbogel
Copy link
Owner

ccbogel commented May 13, 2023

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
Copy link
Owner

ccbogel commented May 13, 2023

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 ccbogel changed the title failing to start on linux 38failing to start on linux - Fedora May 13, 2023
@ccbogel ccbogel changed the title 38failing to start on linux - Fedora Failing to start on linux - Fedora 38 May 13, 2023
ilippert added a commit to ilippert/QualCoder that referenced this issue May 14, 2023
cleaned up fedora install and included fix for ccbogel#794 (comment)
@ilippert
Copy link
Contributor Author

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.

@frukto
Copy link

frukto commented May 14, 2023

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.

@ilippert
Copy link
Contributor Author

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 #795.

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

@frukto
Copy link

frukto commented May 15, 2023

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.

@ccbogel
Copy link
Owner

ccbogel commented May 15, 2023

The Fedora shell script has updated that line, thx ilippiert

@ilippert
Copy link
Contributor Author

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
Copy link
Contributor Author

ilippert commented Jul 2, 2023

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?

@ccbogel
Copy link
Owner

ccbogel commented Jul 3, 2023

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.

@bzwierz
Copy link

bzwierz commented Aug 6, 2023

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?

@ccbogel
Copy link
Owner

ccbogel commented Aug 6, 2023

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.

@ilippert
Copy link
Contributor Author

ilippert commented Aug 9, 2023

Hmm, I reinstalled Fedora and that did not help.

@ilippert
Copy link
Contributor Author

ilippert commented Aug 9, 2023

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.

@ccbogel
Copy link
Owner

ccbogel commented Aug 9, 2023

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 ccbogel changed the title Failing to start on linux - Fedora 38 Failing to start on Linux Fedora 38 - Solved Aug 9, 2023
@ccbogel ccbogel added the Solved Solution to problem shown label Aug 9, 2023
@ilippert
Copy link
Contributor Author

ilippert commented Aug 23, 2023

Hi, I checked the issue and solution on another Fedora system, too.
I confirm the #794 (comment) solution:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solved Solution to problem shown
Projects
None yet
Development

No branches or pull requests

4 participants