clj-python / clj-python/libpython-clj
failure on macos M1 when JVM and python architecture do not match
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Clojure
- Sterne
- 1.2k
- Forks
- 74
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I tried out libpython-clj and was facing the following error message:
"Execution error at libpython-clj2.python/initialize! (python.clj:87).
Failed to find a valid python library!"
The cause of this error was that I was using JVM for x86_64 via Rosetta and python was referencing to a native arm64.
After using a arm64 JVM it worked.
It took me quite some time to figure this out.
I think it would be helpful to mention in the docs that the architecture of python and jvm must match.
Further we could check this requirement during the initialize! function and return a proper error message.
This would improve user experience.
In the JVM we can check the architecture with:
(System/getProperty "os.arch")
This gives aarch64 or x86_64.
In python we can check the architecture with:
import platform
platform.machine()
on M1 this returns 'arm64'.
Hendrik
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne bei libpython-clj2/python.clj:87 und der Funktion initialize!, und finde anschließend die relevante Dokumentation zu den Anforderungen an Einrichtung und Architektur. Bestätige, wie die Architekturen von JVM und Python ermittelt werden, dokumentiere die erforderliche Übereinstimmung und stelle sicher, dass die Initialisierung einen eindeutigen Fehler meldet, wenn sie voneinander abweichen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- clojure, python
- Bereich
- backend, documentation
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100