JuliaPy / JuliaPy/PyCall.jl

InitError: incompatible libpython detected right after rebuild

オープン
#894 コメント 0 件 リアクション 3 件 担当者 0 名 GitHub で見る
主要言語
Julia
スター
1.5k
フォーク
186
PR マージ指標
30日以内にマージされた PR はありません

説明

I have set the following env variables
```
export PYCALL_JL_RUNTIME_PYTHON=$(which python)
export PYTHON=$(which python)
```
python is installed through Pyenv, and i use it through a virtual environment
```
Ricerca/Scratch/PyJl via ஃ v1.6.0 via python-3.9.4 via 🐍 3.9.4
➜ which python
~/Documents/pythonenvs/pyjl/python-3.9.4/bin/python
```
And If I launch Julia i get the error that i do not understand:

```julia
Dropbox/Ricerca/Scratch
➜ cd PyJl/
direnv: loading ~/Dropbox/Ricerca/Scratch/PyJl/.envrc
direnv: export +JULIA_PROJECT +PYCALL_JL_RUNTIME_PYTHON +PYENV_VERSION +PYTHON +VIRTUAL_ENV +direnv_layout_dir ~PATH

Ricerca/Scratch/PyJl via ஃ v1.6.0 via python-3.9.4 via 🐍 3.9.4
➜ julia --project=.
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.6.0 (2021-03-24)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(PyJl) pkg> build PyCall
Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/6231e40619c15148bcb80aa19d731e629877d762/build.log`
Building PyCall → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/169bb8ea6b1b143c5cf57df6d34d022a7b60c6db/build.log`
Progress [========================================>] 1/1
1 dependency successfully precompiled in 4 seconds (28 already precompiled)

julia> using PyCall
ERROR: InitError: Incompatible `libpython` detected.
`libpython` for /home/filippovicentini/Documents/pythonenvs/pyjl/python-3.9.4/bin/python is:
/home/filippovicentini/.pyenv/versions/3.9.4/lib/python3.9/config-3.9-x86_64-linux-gnu/libpython3.9.a
`libpython` for /home/filippovicentini/Documents/pythonenvs/pyjl/python-3.9.4/bin/python is:
/lib64/libpython3.9.so
PyCall.jl only supports loading Python environment using
the same `libpython`.

Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] __init__()
@ PyCall ~/.julia/packages/PyCall/BD546/src/pyinit.jl:168
[3] _include_from_serialized(path::String, depmods::Vector{Any})
@ Base ./loading.jl:674
[4] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
@ Base ./loading.jl:760
[5] _require(pkg::Base.PkgId)
@ Base ./loading.jl:998
[6] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:914
[7] require(into::Module, mod::Symbol)
@ Base ./loading.jl:901
during initialization of module PyCall
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with the PyCall initialization path at src/pyinit.jl:168 and reproduce the failure using the shown Julia project, Python virtual environment, and PYCALL_JL_RUNTIME_PYTHON settings. Compare the libpython paths reported during initialization with the PyCall build output in the referenced build logs. Done means PyCall initializes successfully with the selected Python environment.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
julia, python
領域
backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。