JuliaPy / JuliaPy/PyCall.jl

Not able to use custom python environment

Đang mở
#976 0 bình luận 0 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ả

Hello, I'm on a mac m1 and have installed julia with the x86_64 arch. I also have a working python environment using the same arch. I tried building PyCall as mentioned in the readme to use a custom python environment where I have some libraries installed. However, I get an error. Here's the building procedure and attempt to use Pycall:

```julia
julia> ENV["PYTHON"] = "/Users/vladimirvargas/.local/share/virtualenvs/physics-jfSzH1Jb/bin/python"
"/Users/vladimirvargas/.local/share/virtualenvs/physics-jfSzH1Jb/bin/python"

julia> using Pkg; Pkg.build("PyCall")
Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/6cdc8832ba11c7695f494c9d9a1c31e90959ce0f/build.log`
Building PyCall → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/71fd4022ecd0c6d20180e23ff1b3e05a143959c2/build.log`

julia> using PyCall

julia> nk = pyimport("netket")
Assertion failed: (findOption(Name) == Values.size() && "Option already exists!"), function addLiteralOption, file /Users/ci/miniconda3/conda-bld/llvmdev_1601977477900/work/include/llvm/Support/CommandLine.h, line 853.

signal (6): Abort trap: 6
in expression starting at REPL[4]:1
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 3683833 (Pool: 3681426; Big: 2407); GC: 4
[1] 25372 abort julia
```

From the assertion message it seems that somehow PyCall is looking into some miniconda stuff. I don't know why this is the case since my python environment has nothing to do with conda: it is a pipenv environment.

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

Start with the PyCall README section on configuring a custom Python environment, then reproduce the reported ENV["PYTHON"], Pkg.build("PyCall"), and pyimport("netket") sequence on the stated macOS M1 setup. Check the PyCall and build logs for why miniconda paths appear; done means the configured pipenv Python can be imported without the LLVM assertion.

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
tooling
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
Khá rõ ràng
Mức phù hợp với người mới
35/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.