clj-python / clj-python/libpython-clj
failure on macos M1 when JVM and python architecture do not match
Nessuno ha ancora preso questa issue.
- Lingua principale
- Clojure
- Stelle
- 1.2k
- Fork
- 74
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da libpython-clj2/python.clj:87 e dalla funzione initialize!, quindi individua la documentazione pertinente sui requisiti di configurazione e architettura. Conferma come vengono ottenute le architetture di JVM e Python, documenta il requisito di corrispondenza e assicurati che l'inizializzazione segnali un errore chiaro quando differiscono.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- clojure, python
- Ambito
- backend, documentation
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100