clj-python / clj-python/libpython-clj
failure on macos M1 when JVM and python architecture do not match
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Clojure
- Estrelas
- 1.2k
- Forks
- 74
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece em libpython-clj2/python.clj:87 e na função initialize!, depois localize a documentação relevante sobre os requisitos de configuração e arquitetura. Confirme como as arquiteturas de JVM e Python são obtidas, documente o requisito de correspondência e garanta que a inicialização informe um erro claro quando forem diferentes.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- clojure, python
- Domínio
- backend, documentation
- Tipo de issue
- Funcionalidade
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100