在Archlinux上用于Matplotlib的PyQt4、PyQt5或PySide

时间:2021-12-01 23:44:35

I cannot use matplotlib anymore (on python 3.5, archlinux, kde). After a system update with pacman I got an error that PySide is not installed. When I unsuccessfully tried to install it using pip3, I found out that since PySide version 1.2.4, python 3.5 is explicitly unsupported. So after some research, I found out that PyQt4 or PyQt5 should work as well. When I try to install PyQt4 or 5 with pip3, I get the following message

我不能再使用matplotlib(在python 3.5、archlinux、kde上)。在pacman系统更新后,我发现PySide没有安装。当我尝试使用pip3安装它失败时,我发现自从PySide版本1.2.4以来,python 3.5明显不受支持。所以经过一番研究,我发现PyQt4或PyQt5也应该起作用。当我尝试使用pip3安装PyQt4或5时,我得到了以下消息。

$ sudo pip3 install PyQt5
Collecting PyQt5
Could not find a version that satisfies the requirement PyQt5 (from versions: )
No matching distribution found for PyQt5

qmake --version returns

qmake——版本返回

$ qmake --version
QMake version 3.0
Using Qt version 5.5.1 in /usr/lib

Does anybody know a solution to this problem?

有人知道解决这个问题的办法吗?

1 个解决方案

#1


1  

I found a solution to my problem. In another thread on PyQt4 installation problems here I found the useful comment by Ivo that, on Linux, one should install the PyQt packages using the native package manager. So I installed PyQt4 and PyQt5 with pacman and now everything seems to work fine.

我找到了解决我问题的办法。在PyQt4安装问题的另一个线程中,我发现了Ivo的有用注释,即在Linux上,应该使用本机包管理器安装PyQt包。所以我用pacman安装了PyQt4和PyQt5,现在一切看起来都很好。

Note: It was necessary to reset the kernel first. Otherwise I just got a new error message.

注意:有必要首先重置内核。否则,我就会得到一个新的错误消息。

#1


1  

I found a solution to my problem. In another thread on PyQt4 installation problems here I found the useful comment by Ivo that, on Linux, one should install the PyQt packages using the native package manager. So I installed PyQt4 and PyQt5 with pacman and now everything seems to work fine.

我找到了解决我问题的办法。在PyQt4安装问题的另一个线程中,我发现了Ivo的有用注释,即在Linux上,应该使用本机包管理器安装PyQt包。所以我用pacman安装了PyQt4和PyQt5,现在一切看起来都很好。

Note: It was necessary to reset the kernel first. Otherwise I just got a new error message.

注意:有必要首先重置内核。否则,我就会得到一个新的错误消息。