johnfanv2 / LenovoLegionLinux

Driver and tools for controlling Lenovo Legion laptops in Linux including fan control and power mode.
https://github.com/johnfanv2/LenovoLegionLinux
GNU General Public License v2.0
1.52k stars 55 forks source link

[BUG] Error when trying the GUI #196

Closed growlingman closed 4 months ago

growlingman commented 5 months ago

Hello I also have the same problem with [#160] but I dont understand how is it solved trying to run sudo python/legion_linux/legion_linux/legion_gui.py produces: Traceback (most recent call last): File "/LenovoLegionLinux/python/legion_linux/legion_linux/legion_gui.py", line 12, in from PyQt6 import QtGui, QtCore ModuleNotFoundError: No module named 'PyQt6'

However I have installed PyQt6 on my own and importing it on python3 terminal return no error. Thanks

st0nie commented 5 months ago

How did you install PyQt6 and what is your Linux distribution? We need more detailed information

growlingman commented 5 months ago

Im on ubuntu 20.04 lts. I installed PyQt6 with pip install PyQt6 thanks for the response

st0nie commented 5 months ago
pip uninstall PyQt6
sudo apt install python3-pyqt6

try this

growlingman commented 5 months ago

Sorry for the late response. sudo apt install python3-pyqt6 return E: Unable to locate package python3-pyqt6. Btw I am actually on Ubuntu 22.04.4 LTS not 20.04, sorry for the mistake.

st0nie commented 5 months ago

https://packages.ubuntu.com/search?keywords=python3-pyqt6

---Original--- From: @.> Date: Mon, Apr 15, 2024 04:36 AM To: @.>; Cc: @.**@.>; Subject: Re: [johnfanv2/LenovoLegionLinux] [BUG] Error when trying the GUI(Issue #196)

Sorry for the late response. sudo apt install python3-pyqt6 return E: Unable to locate package python3-pyqt6. Btw I am actually on Ubuntu 22.04.4 LTS not 20.04, sorry for the mistake.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

bloodhori commented 5 months ago

I have the exact problem on Pop_OS. PyQt6 is installed, i reinstalled it with Pip because apt can't find it. The link provided above has packages for Ubuntu and Firefox deems it a security risk when i try to download it. Am i supposed to add it to the repo list manually?

st0nie commented 5 months ago

It seems that the distro you're using doesn't support installing pyqt6 with apt right now, so if you don't care, you can leave legion_gui out for now, it doesn't affect legion_cli's functionality

st0nie commented 5 months ago

If using Ubuntu, upgrade to a newer version instead of using lts

st0nie commented 5 months ago

CC @MrDuartePT The deb package now seems to rely on python-pyqt5, which should now be changed to python-pyqt6

st0nie commented 5 months ago

Sorry for the late response. sudo apt install python3-pyqt6 return E: Unable to locate package python3-pyqt6. Btw I am actually on Ubuntu 22.04.4 LTS not 20.04, sorry for the mistake.

Ubuntu 24.04 LTS was released, update to it so you can install python-pyqt6

MrDuartePT commented 5 months ago

CC @MrDuartePT The deb package now seems to rely on python-pyqt5, which should now be changed to python-pyqt6

This is a problem with github CI being on jammy, I need to update the build process when I have time to use a docker container instead. Also when I do that change I will drop support to Ubuntu 22.04 LTS flavors and lower.

MrDuartePT commented 4 months ago

Well I drop the deb packages since, a debian packages are available, but pyqt6 need to be install manually, forget to change to pyqt6 in the install requirements of the setup.cfg (opps, I gonna do new tag)

MrDuartePT commented 4 months ago

@thomasgoirand when you can update the debian package to latest TAG to fix the PyQT6 dependencies

DPEIW commented 3 months ago

On fedora 40, dnf works as well, solved the issue for me.

Flashwalker commented 3 months ago

I have the same issue after upgrading LenovoLegionLinux GUI from repo. Ubuntu 22.04. There is no pyqt6 in repos.

MrDuartePT commented 3 months ago

I have the same issue after upgrading LenovoLegionLinux GUI from repo. Ubuntu 22.04. There is no pyqt6 in repos.

The problems is 22.04 upgrade to something newer like 24.04 or install PyQT6 from pip

This change was made since I don’t have any qt5 apps on my system so I don’t want to maintain qt5 depedency for LLL only, also I running kde 6.1 that it uses qt6.