Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac M1 no PyQt5 support #314

Open
xenein opened this issue Jun 4, 2021 · 6 comments
Open

Mac M1 no PyQt5 support #314

xenein opened this issue Jun 4, 2021 · 6 comments
Labels
information Informations

Comments

@xenein
Copy link
Contributor

xenein commented Jun 4, 2021

In den neueren Versionen sind die Abhängigkeiten für pyQT in der requirements.txt auch in "master" dazugekommen. Die Installation klappt für mich nicht, sobald pip beim ersten QT-Paket ankommt, bleibt es für Stunden beim Spinner stehen. Also zwischenzeitlichen Fix könnten die QT-Einträge in der requirements.txt für darwin-Platformen ausgesetzt werden

index e2d1ad9..b65a677 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,6 +6,7 @@ urllib3>=1.26.4
 pyinstaller>=4.3
 plyer>=2.0.0
 cloudscraper>=1.2.52
-PyQt5==5.15.4
-PyQt5-Qt5==5.15.2
-PyQt5-sip==12.9.0
\ No newline at end of file
+PyQt5==5.15.4; sys_platform != "darwin"
+PyQt5-Qt5==5.15.2; sys_platform != "darwin"
+PyQt5-sip==12.9.0; sys_platform != "darwin"

ergänzend, falls versucht wird, die gui.py zu starten:

index d8070f0..c5e6f6b 100644
--- a/gui.py
+++ b/gui.py
@@ -5,9 +5,15 @@ import json
 import time
 import threading
 import multiprocessing
+import sys
+
+if sys.platform == "darwin":
+       print("Die GUI-Version wird aktuell auf macOS nicht unterstützt.")
+       sys.exit()
 
 from PyQt5 import QtCore, QtWidgets, uic
 from PyQt5.QtGui import QIcon
+
 from tools.exceptions import ValidationError, MissingValuesError
 from tools.gui import oeffne_file_dialog_select
 from tools.gui.qtzeiten import QtZeiten

Das hier ist kein Pull-Request, sondern schlicht zwei git diffs, weil es (a) nur ein temporärer fix ist und ich (b) nicht nachvollziehen konnte, ob das ein lokales Problem mit meiner Installation ist oder insgesamt ein (m1) Mac-Problem.

@timreibe
Copy link
Owner

timreibe commented Jun 4, 2021

Das liegt an Mac M1, leider. Wie so viele Packages wird PyQt5 irgendwie noch nicht wie gewohnt unterstützt. Habe das selbe Problem.

GUI gibt es bisher nur für Windows, Ubuntu muss noch repariert und getestet werden.

@JuliusJacobitz JuliusJacobitz changed the title pip install -r requirements läuft nicht auf macOS 11.4 Mac M1 no PyQt5 support Jun 4, 2021
@xenein
Copy link
Contributor Author

xenein commented Jun 4, 2021

Wenn das für Intel-Macs funktioniert, dann ist platform_machine == "x86_64" für die requirements.txt als check wohl die bessere Variante.

Das Gate in der Gui.py dann mit platform.processor.

@thunderbolt93
Copy link

Würde vermuten, dass er dann versucht PyQt5 aus dem quellcode zu kompilieren, das kann schon 2-3 stunden dauern
würde mal mit htop oder sonstigem prozess-viewer gucken, ob er was macht

evtl. wäre auch eine installation über homebrew (sofern es das für den M1 gibt) denkbar

@xenein
Copy link
Contributor Author

xenein commented Jun 9, 2021

Collecting PyQt5==5.15.4
  Using cached PyQt5-5.15.4.tar.gz (3.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
ERROR: Could not find a version that satisfies the requirement PyQt5-Qt5==5.15.2 (from versions: none)
ERROR: No matching distribution found for PyQt5-Qt5==5.15.2

hab das nochmal länger laufen gehabt. das sieht nicht aus, wie lokaler Build, das scheint einfach auszusteigen?

homebrew läuft auch auf M1, es gibt dort auch pyqt@5. wenn ich dann in der requirements.txt die beiden pyQt Zeilen auskommentiere, kann ich nach dem pip install tatsächlich auch gui.py starten. Das schon mal ein guter Anfang, Ziel der Aktion ist ja aber eigentlich, eine requirements.txt im Repo zu haben, die für mich ungepatcht und ohne Fehler durchläuft.

@thunderbolt93
Copy link

Okay ja mit der fehlermeldung ist es definitiv ein "einfach aussteigen"
aber 5.15.4 ist auch ziemlich neu, evtl mal ohne das version-pinning versuchen und schauen, was er (wenn überhaupt) runterlädt

@xenein
Copy link
Contributor Author

xenein commented Jun 10, 2021

ERROR: Could not find a version that satisfies the requirement PyQt5-Qt5 (from versions: none)
ERROR: No matching distribution found for PyQt5-Qt5

klingt jetzt nicht so gut dafür.

@timreibe timreibe added the information Informations label Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information Informations
Projects
None yet
Development

No branches or pull requests

3 participants