Error due to libpython issuses
还没有人认领这个 Issue。
评估
调研方向
从 julia/core.py 中的 traceback 开始,重点检查 Julia 构造函数及其 UnsupportedPythonError 检查。重现 from julia import Base 的失败,并将其与链接的 troubleshooting 页面中记录的 compiled_modules=False 和 python-jl 解决方法进行比较。完成标准是:已确认所报告的 Python/libpython 设置存在解决方案,或已清楚记录其限制,其中包括是否可以导入 diffeqpy。
由索引模型根据 Issue 内容生成。
描述
Hi, this might be an overlapping issue from previous ones but since I couldn't find a way to solve it, I'm leaving it here.
When I'm trying to import Base, it shows the issue below. I am trying to use another python-julia package diffeqpy and I can not use it also because of this issue.
I tried the "workaround" suggested on the page and seemed nothing really helped much.
Any kind of comments would be very helpful.
>>> from julia import Base
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "/Users/juanko/miniconda3/envs/node/lib/python3.9/site-packages/julia/core.py", line 248, in load_module
elif self.julia.isafunction(juliapath):
File "/Users/juanko/miniconda3/envs/node/lib/python3.9/site-packages/julia/core.py", line 239, in julia
self.__class__.julia = julia = Julia()
File "/Users/juanko/miniconda3/envs/node/lib/python3.9/site-packages/julia/core.py", line 483, in __init__
raise UnsupportedPythonError(jlinfo)
julia.core.UnsupportedPythonError: It seems your Julia and PyJulia setup are not supported.
Julia executable:
julia
Python interpreter and libpython used by PyCall.jl:
/Users/juanko/miniconda3/envs/node/bin/python3
/Users/juanko/miniconda3/envs/node/lib/libpython3.9.dylib
Python interpreter used to import PyJulia and its libpython.
/Users/juanko/miniconda3/envs/node/bin/python3
/Users/juanko/miniconda3/envs/node/lib/libpython3.9.dylib
Your Python interpreter "/Users/juanko/miniconda3/envs/node/bin/python3"
is statically linked to libpython. Currently, PyJulia does not fully
support such Python interpreter.
The easiest workaround is to pass `compiled_modules=False` to `Julia`
constructor. To do so, first *reboot* your Python REPL (if this happened
inside an interactive session) and then evaluate:
>>> from julia.api import Julia
>>> jl = Julia(compiled_modules=False)
Another workaround is to run your Python script with `python-jl`
command bundled in PyJulia. You can simply do:
$ python-jl PATH/TO/YOUR/SCRIPT.py
See `python-jl --help` for more information.
For more information, see:
https://pyjulia.readthedocs.io/en/latest/troubleshooting.html
Thanks
- 主要语言
- Python
- 星标
- 893
- 派生
- 101
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaPy/pyjulia 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 20/100
-
难度 3/5 1-2 天 新手友好度 48/100
-
难度 5/5 一周以上 新手友好度 25/100
相似的 Issue
-
integration: logger
难度 2/5 1-3 小时 新手友好度 68/100
home-assistant/core#191147 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
documentation p4
难度 1/5 1-3 小时 新手友好度 88/100
MillenniumDawn/focus-tree-creation-tool#417 ·
维护者通常 3 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
CharlesP44/Beem_Energy#96 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
rheeloaded/paperpull#153 ·
维护者通常 1 天内回复