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