clj-python / clj-python/libpython-clj
failure on macos M1 when JVM and python architecture do not match
还没有人认领这个 Issue。
- 主要语言
- Clojure
- 星标
- 1.2k
- 派生
- 74
- PR 合并指标
- 30 天内没有已合并 PR
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 libpython-clj2/python.clj:87 和 initialize! 函数开始,然后查找有关设置和架构要求的相关文档。确认如何获取 JVM 和 Python 的架构,记录匹配要求,并确保初始化在两者不一致时报告清晰的错误。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- clojure, python
- 领域
- backend, documentation
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100