Wrong libpython configuration after changing python dir on Linux
Chưa có ai nhận issue này.
- 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 want to make a portable app with PyCall included, so I move conda into a common folder (this folder I would later copy to another machine when deploying compiled app binaries):
```
sudo cp -rf ~/.julia/conda /opt/conda
```
Then I rebuild PyCall and make sure all conda and python-related paths (there are much of them!) point to the right place:
```julia
julia -e 'import Pkg;
ENV["CONDA_JL_HOME"] = "/opt/conda/3";
ENV["PYTHON"] = "/opt/conda/3/bin/python3.9";
Pkg.add("PyCall");
Pkg.build("PyCall");
using PyCall
@info(
"Conda.jl and PyCall.jl configuration after build, BUT wrong libpython!",
PyCall.Conda.ROOTENV,
PyCall.Conda.MINICONDA_VERSION,
PyCall.Conda.deps_file,
PyCall.Conda.PREFIX,
PyCall.Conda.BINDIR,
PyCall.Conda.LIBDIR,
PyCall.Conda.SCRIPTDIR,
PyCall.Conda.PYTHONDIR,
PyCall.Conda.conda,
PyCall.Conda.CONDARC,
PyCall.PYTHONHOME,
PyCall.libpython
)
'
```
Which gives me all paths set right but `PyCall.libpython`, which prevents me from running my compiled app on another machine: (also, I'm not sure about colons in `PyCall.PYTHONHOME`)
```
┌ Info: Conda.jl and PyCall.jl configuration after build, BUT wrong libpython!
│ PyCall.Conda.ROOTENV = "/opt/conda/3"
│ PyCall.Conda.MINICONDA_VERSION = "3"
│ PyCall.Conda.deps_file = "/home/root2/.julia/packages/Conda/x2UxR/src/../deps/deps.jl"
│ PyCall.Conda.PREFIX = "/opt/conda/3"
│ PyCall.Conda.BINDIR = "/opt/conda/3/bin"
│ PyCall.Conda.LIBDIR = "/opt/conda/3/lib"
│ PyCall.Conda.SCRIPTDIR = "/opt/conda/3/bin"
│ PyCall.Conda.PYTHONDIR = "/opt/conda/3/bin"
│ PyCall.Conda.conda = "/opt/conda/3/bin/conda"
│ PyCall.Conda.CONDARC = "/opt/conda/3/condarc-julia.yml"
│ PyCall.PYTHONHOME = "/opt/conda/3:/opt/conda/3"
└ PyCall.libpython = "/home/root2/.julia/conda/3/lib/libpython3.9.so.1.0"
```
Contents of deps.jl:
```bash
$ cat /home/root2/.julia/packages/Conda/x2UxR/src/../deps/deps.jl
const ROOTENV = "/opt/conda/3"
const MINICONDA_VERSION = "3"
const USE_MINIFORGE = true
const CONDA_EXE = "/opt/conda/3/bin/conda"
```
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện cấu hình với Pkg.build("PyCall") và kiểm tra deps.jl được tạo cùng với PyCall.Conda.libpython và PyCall.PYTHONHOME. Theo dõi nơi PyCall.libpython được chọn sau khi thư mục conda thay đổi; hoàn thành khi nó được phân giải trong /opt/conda/3 và ứng dụng đã biên dịch dạng portable có thể chạy trên một máy khác.
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, build-system
- 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