Closed audio101 closed 1 year ago
I worked before ? The PyQt5 is installed ? Try reinstall meteo-qt: https://github.com/dglent/meteo-qt/issues/105#issuecomment-740463408
Yes, previously was working. Reinstalled meteo-qt 3.3-1 (AUR), still doesn't load. PyQt5 already installed.
Try then to reinstall PyQt5 ?
Try this:
[dglent@localhost ~]$ python
Python 3.8.14 (default, Oct 4 2022, 06:27:18)
[GCC 10.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtCore import PYQT_VERSION_STR
>>> PYQT_VERSION_STR
'5.15.2'
>>>
and see what is the output
$ python Python 3.11.3 (main, Jun 5 2023, 09:32:32) [GCC 13.1.1 20230429] on linux Type "help", "copyright", "credits" or "license" for more information.
And then type one by one these lines:
from PyQt5.QtCore import PYQT_VERSION_STR
import PyQt5.QtCore
import PyQt5
You shouldn't have any error message
In my PC:
[dglent@localhost ~]$ python
Python 3.8.14 (default, Oct 4 2022, 06:27:18)
[GCC 10.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtCore import PYQT_VERSION_STR
>>> import PyQt5.QtCore
>>> import PyQt5
>>>
Nop..still doesn't load..
Can you post the output ?
Sane as original post:
meteo-qt
Traceback (most recent call last):
File "/usr/bin/meteo-qt", line 4, in
No don't run the program Open the terminal and the python interpreter and type the import commands as in the example to see the output
Yes I already did that, it installs/imports fine, there was no terminal output message/error.
Hello @pmav99, @pmattern , would you had any explanation why the import PyQt5.QtCore fails (Manjaro) ?
Was there perhaps a recent upgrade to the Python major version? I don't use Manjaro but some quick googling showed that Manjaro might have moved to 3.11 only recently. If that is the case, then all the python packages need to be reinstalled.
In any case, the output from @audio101 in this comment indicates that python-pyqt5
or however that package is named on Manjaro has not been installed for python 3.11.
@audio101 open a new terminal paste the following commands and press enter. Please copy paste here both the commands and their full output.
which python
python -V
python -m site
python -c 'from PyQt5.QtCore import PYQT_VERSION_STR; print(PYQT_VERSION_STR)'
which meteo-qt
head $(which meteo-qt)
python -c 'from meteo_qt import meteo_qt; print(meteo_qt.__version__)'
For reference, on my machine (Archlinux) the output is this:
/usr/bin/python
Python 3.11.3
sys.path = [
'/home/<...>',
'/usr/lib/python311.zip',
'/usr/lib/python3.11',
'/usr/lib/python3.11/lib-dynload',
'/home/<...>/.local/lib/python3.11/site-packages',
'/usr/lib/python3.11/site-packages',
]
USER_BASE: '/home/<...>/.local' (exists)
USER_SITE: '/home/<...>/.local/lib/python3.11/site-packages' (exists)
ENABLE_USER_SITE: True
5.15.9
/usr/bin/meteo-qt
#!/usr/bin/python
if __name__ == '__main__':
from meteo_qt import meteo_qt
meteo_qt.main()
3.3
PS. @audio101 when pasting code please use triple backticks .
/usr/bin/python
Python 3.11.3
sys.path = [
'/home/<...>',
'/usr/lib/python311.zip',
'/usr/lib/python3.11',
'/usr/lib/python3.11/lib-dynload',
'/usr/lib/python3.11/site-packages',
'/usr/lib/python3.11/site-packages/linkgrammar',
]
USER_BASE: '/home/<...>.local' (exists)
USER_SITE: '/home/<...>/.local/lib/python3.11/site-packages' (doesn't exist)
ENABLE_USER_SITE: True
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt5.QtCore'
/usr/bin/meteo-qt
#!/usr/bin/python
if __name__ == '__main__':
from meteo_qt import meteo_qt
meteo_qt.main()
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.11/site-packages/meteo_qt/meteo_qt.py", line 21, in <module>
from PyQt5.QtCore import (
ModuleNotFoundError: No module named 'PyQt5.QtCore'
OK. So this fails: python -c 'from PyQt5.QtCore import PYQT_VERSION_STR; print(PYQT_VERSION_STR)'
which means that you haven't installed pyqt5 for python3.11.
Try to run:
pacman -Syu python-pyqt5
Or whatever is the manjaro equivalent (pamac
or however it is called).
:: python-pyqt5 and python-pyqt5-webkit are in conflict. Remove python-pyqt5-webkit? [y/N]
Packages (2) python-pyqt5-webkit-5.15.9-1 [removal] python-pyqt5-5.15.9-2
(1/1) installing python-pyqt5 [######################] 100% Optional dependencies for python-pyqt5 python-opengl: enable OpenGL 3D graphics in PyQt applications [installed] python-dbus: for python-dbus mainloop support [installed] qt5-multimedia: QtMultimedia, QtMultimediaWidgets [installed] qt5-tools: QtHelp, QtDesigner [installed] qt5-svg: QtSvg [installed] qt5-xmlpatterns: QtXmlPatterns [installed] qt5-declarative: QtQml, qmlplugin [installed] qt5-serialport: QtSerialPort [installed] qt5-websockets: QtWebSockets [installed] qt5-connectivity: QtNfc, QtBluetooth [installed] qt5-x11extras: QtX11Extras [installed] qt5-remoteobjects: QtRemoteObjects [installed] qt5-speech: QtTextToSpeech [installed] qt5-quick3d: QtQuick3D [installed] qt5-location: QtLocation, QtPositioning [installed] qt5-sensors: QtSensors [installed] qt5-webchannel: QtWebChannel [installed] :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate...
Finally working now, thanks guys..
Prior to this issue, I already had ran/installed "# pacman -S python-pyqt5 python-sip python-lxml" runtime dependencies..
Just wanted to clarify why it didn't load previously even though python-pyqt5 was already installed?
Great ! Thanks to @pmav99 ;)
$ meteo-qt Traceback (most recent call last): File "/usr/bin/meteo-qt", line 4, in
from meteo_qt import meteo_qt
File "/usr/lib/python3.11/site-packages/meteo_qt/meteo_qt.py", line 21, in
from PyQt5.QtCore import (
ModuleNotFoundError: No module named 'PyQt5.QtCore'
[OS: Manjaro XFCE]