Skip to content

Python3 - PyQt6 installieren

Python3
  • Immer wenn ich versuche PyQt6 zu installieren, bekomme ich merkwürdige Fehlermeldungen.

    frank@frank-MS-7C37:~/qsettings$ pipenv install PyQt6
    Installing PyQt6…
    Looking in indexes: https://pypi.python.org/simple
    Collecting PyQt6
      Using cached PyQt6-6.2.2-cp36-abi3-manylinux1_x86_64.whl (7.7 MB)
    
    Error:  An error occurred while installing PyQt6!
    ERROR: Could not find a version that satisfies the requirement PyQt6-Qt6>=6.2.2 (from PyQt6) (from versions: none)
    ERROR: No matching distribution found for PyQt6-Qt6>=6.2.2 (from PyQt6)
    

    Sauber läuft das nur, wenn das Paket pip aktuell ist. Also hier mal eine Vorgehensweise, wie man das sauber installiert.

    env Umgebung bauen

    pipenv --python 3.8
    

    Danach, die Umgebung starten

    frank@frank-MS-7C37:~/qsettings$ pipenv shell
    Spawning environment shell (/bin/bash). Use 'exit' to leave.
    

    pip aktualisieren

    (qsettings-kBmIZW-V) frank@frank-MS-7C37:~/qsettings$ python -m pip install -U pip
    Collecting pip
      Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
    Installing collected packages: pip
      Attempting uninstall: pip
        Found existing installation: pip 20.0.2
        Uninstalling pip-20.0.2:
          Successfully uninstalled pip-20.0.2
    Successfully installed pip-21.3.1
    

    PyQt6 installieren

    (qsettings-kBmIZW-V) frank@frank-MS-7C37:~/qsettings$ pipenv install PyQt6
    Installing PyQt6…
    Looking in indexes: https://pypi.python.org/simple
    Collecting PyQt6
      Using cached PyQt6-6.2.2-cp36-abi3-manylinux1_x86_64.whl (7.7 MB)
    Collecting PyQt6-sip<14,>=13.2
      Using cached PyQt6_sip-13.2.0-cp38-cp38-manylinux1_x86_64.whl (310 kB)
    Collecting PyQt6-Qt6>=6.2.2
      Using cached PyQt6_Qt6-6.2.2-py3-none-manylinux_2_28_x86_64.whl (50.0 MB)
    Installing collected packages: PyQt6-sip, PyQt6-Qt6, PyQt6
    Successfully installed PyQt6-6.2.2 PyQt6-Qt6-6.2.2 PyQt6-sip-13.2.0
    
    Adding PyQt6 to Pipfile's [packages]…
    Pipfile.lock not found, creating…
    Locking [dev-packages] dependencies…
    Locking [packages] dependencies…
    Updated Pipfile.lock (7f928c)!
    Installing dependencies from Pipfile.lock (7f928c)…
      🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 3/3 — 00:00:00
    

    Danach meckert auch nicht mehr, wenn ich ein PyQt6 Modul importieren möchte

    from PyQt6.QtCore import QSettings
    
  • FrankMF FrankM hat am auf dieses Thema verwiesen

  • Python - Frameworks

    Python3
    2
    0 Votes
    2 Posts
    76 Views
    FrankMF

    Und mal hier parken

  • 0 Votes
    5 Posts
    184 Views
    FrankMF

    Ich hatte im Python Forum mal um Hilfe gebeten und man hat mir einen Hinweis gegeben, dem ich hier mal nachgehe.

    Der Forenuser meinte, das es ihn wundern würde, wenn ich von QtCore importieren müsste, also

    self.addDockWidget(QtCore.Qt.DockWidgetArea.RightDockWidgetArea, self.items)

    Das habe ich mal ausprobiert. Wenn ich von QtCore Qt importiere, kann ich das QtCore weglassen.

    from PyQt6.QtCore import QSettings, Qt

    dann geht auch

    self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.items)

    Es sieht so aus, das ich mich in dieses Thema noch ein wenig einarbeiten muss 🙂

  • 0 Votes
    2 Posts
    215 Views
    FrankMF

    Der Autor hat meine Anpassungen um ein paar Änderungen erweitert und in sein Repo eingepflegt. Der QtWaitingSpinenr ist jetzt auch 3.10 kompatibel 🤓

    1b268980-92ca-42a4-89a0-a6e4b7ab9378-grafik.png

  • Django - Webframework

    Python3
    1
    0 Votes
    1 Posts
    105 Views
    No one has replied
  • 0 Votes
    1 Posts
    214 Views
    No one has replied
  • Python3 - QSettings

    Python3
    1
    0 Votes
    1 Posts
    141 Views
    No one has replied
  • 0 Votes
    3 Posts
    301 Views
    FrankMF

    Nach Systemwechsel erneut Probleme. Hier noch mal aufgelistet.

    Aufpassen, das kein venv Ordner vorhanden ist! Neu anlegen!

    python3 -m venv venv

    Dann meckert mein Linux Mint Cinnamon

    The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package using the following command. apt install python3.8-venv You may need to use sudo with that command. After installing the python3-venv package, recreate your virtual environment. Failing command: ['/home/frank/Restic_UI_Produktiv/restic-ui-public/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

    Ok, das ist einfach 😉

    apt install python3.8-venv python3 -m venv venv

    Danach aktivieren

    source venv/bin/activate Installation von PyQt5 (venv) frank@frank-MS-7C37:~/Restic_UI_Produktiv/restic-ui-public$ pip3 install PyQt5 Collecting PyQt5 Downloading PyQt5-5.15.4-cp36.cp37.cp38.cp39-abi3-manylinux2014_x86_64.whl (8.3 MB) |████████████████████████████████| 8.3 MB 1.7 MB/s Collecting PyQt5-Qt5>=5.15 Downloading PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (59.9 MB) |████████████████████████████████| 59.9 MB 18.3 MB/s Collecting PyQt5-sip<13,>=12.8 Downloading PyQt5_sip-12.9.0-cp38-cp38-manylinux1_x86_64.whl (332 kB) |████████████████████████████████| 332 kB 46.1 MB/s Installing collected packages: PyQt5-Qt5, PyQt5-sip, PyQt5 Successfully installed PyQt5-5.15.4 PyQt5-Qt5-5.15.2 PyQt5-sip-12.9.0

    Danach meckert er über ein fehlendes Modul requests

    (venv) frank@frank-MS-7C37:~/Restic_UI_Produktiv/restic-ui-public$ python3 restic_ui.py Traceback (most recent call last): File "restic_ui.py", line 41, in <module> from functions import ( File "/home/frank/Restic_UI_Produktiv/restic-ui-public/functions.py", line 19, in <module> import requests as req ModuleNotFoundError: No module named 'requests' Installation requests (venv) frank@frank-MS-7C37:~/Restic_UI_Produktiv/restic-ui-public$ pip3 install requests Collecting requests Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB) |████████████████████████████████| 61 kB 802 kB/s Collecting chardet<5,>=3.0.2 Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB) |████████████████████████████████| 178 kB 2.7 MB/s Collecting certifi>=2017.4.17 Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB) |████████████████████████████████| 145 kB 14.0 MB/s Collecting idna<3,>=2.5 Downloading idna-2.10-py2.py3-none-any.whl (58 kB) |████████████████████████████████| 58 kB 9.4 MB/s Collecting urllib3<1.27,>=1.21.1 Downloading urllib3-1.26.6-py2.py3-none-any.whl (138 kB) |████████████████████████████████| 138 kB 11.5 MB/s Installing collected packages: chardet, certifi, idna, urllib3, requests Successfully installed certifi-2021.5.30 chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.6

    Und schwupps, geht mein Tool wieder 🙂

    4968ce42-7c66-4c8a-a2ad-424b9a529d87-grafik.png

  • Python und GUI

    Moved Python3
    1
    0 Votes
    1 Posts
    155 Views
    No one has replied