Pages

Saturday, November 6, 2021

Fedora 35 : PyQt6 and Python 3.

I tested the new python version 10 and pyqt version 6 on the fedora version 35 distribution.
[mythcat@fedora ~]$ python
Python 3.10.0 (default, Oct  4 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
...
[mythcat@fedora ~]$ uname -a
Linux fedora 5.14.15-300.fc35.x86_64 #1 SMP Wed Oct 27 15:53:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
I install PyQt6 easy with pip tool:

[mythcat@fedora ~]$ pip install PyQt6 --user
Collecting PyQt6
  Downloading PyQt6-6.2.1-cp36-abi3-manylinux1_x86_64.whl (7.7 MB)
  ...
  Downloading PyQt6_Qt6-6.2.1-py3-none-manylinux_2_28_x86_64.whl (50.0 MB)
  ...
  Downloading PyQt6_sip-13.1.0-cp310-cp310-manylinux1_x86_64.whl (309 kB)
Installing collected packages: PyQt6-sip, PyQt6-Qt6, PyQt6
Successfully installed PyQt6-6.2.1 PyQt6-Qt6-6.2.1 PyQt6-sip-13.1.0
I tested with this python source code and it works fine.
import sys
from PyQt6.QtWidgets import QApplication, QWidget

def main():

    app = QApplication(sys.argv)

    w = QWidget()
    w.resize(250, 200)
    w.move(300, 300)

    w.setWindowTitle('Simple')
    w.show()

    sys.exit(app.exec())

if __name__ == '__main__':
    main()