JuliaPy / JuliaPy/PyCall.jl

InitError: incompatible libpython detected right after rebuild

Đang mở
#894 0 bình luận 3 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Julia
Star
1.5k
Fork
186
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu với đường dẫn khởi tạo PyCall tại src/pyinit.jl:168 và tái hiện lỗi bằng dự án Julia, môi trường ảo Python và các thiết lập PYCALL_JL_RUNTIME_PYTHON được nêu. So sánh các đường dẫn libpython được báo cáo trong quá trình khởi tạo với đầu ra build của PyCall trong các build log được tham chiếu. Được coi là hoàn tất khi PyCall khởi tạo thành công với môi trường Python đã chọn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
julia, python
Lĩnh vực
backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.