clj-python / clj-python/libpython-clj
failure on macos M1 when JVM and python architecture do not match
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Clojure
- Estrellas
- 1.2k
- Forks
- 74
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en libpython-clj2/python.clj:87 y en la función initialize!, y luego localiza la documentación relevante sobre los requisitos de configuración y arquitectura. Confirma cómo se obtienen las arquitecturas de JVM y Python, documenta el requisito de coincidencia y asegúrate de que la inicialización informe de un error claro cuando difieran.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- clojure, python
- Área
- backend, documentation
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100