JuliaPy / JuliaPy/PythonCall.jl
juliacall fails from subprocess if already initialied
- Ngôn ngữ chính
- Julia
- Star
- 1.1k
- Fork
- 86
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 3
Mô tả
**Affects:** JuliaCall
**Describe the bug**
If juliacall is imported, and then a python subprocess uses juliacall, it fails at least when executed with PYTHON_JULIACALL_HANDLE_SIGNALS=yes .
If it's a package limitation, I guess it should be clearly documented. Related to https://github.com/JuliaPy/PythonCall.jl/issues/77
Running this
```mp.py
import os
from multiprocessing import Process
import juliacall
def use_juliacall() -> None:
# import juliacall
print(os.getpid())
juliacall.Base.println("hola")
p = Process(target=use_juliacall)
p.start()
p.join()
```
I get
```
Process Process-1:
Traceback (most recent call last):
File "/home/dani/.pyenv/versions/3.13.4/lib/python3.13/multiprocessing/process.py", line 313, in _bootstrap
self.run()
~~~~~~~~^^
File "/home/dani/.pyenv/versions/3.13.4/lib/python3.13/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dani/source/repos/sc-tools/scpytools/mp.py", line 9, in use_juliacall
juliacall.Base.println("hola")
^^^^^^^^^^^^^^^^^^^^^^
File "/home/dani/.julia/packages/PythonCall/L4cjh/src/JlWrap/any.jl", line 249, in __getattr__
return self._jl_callmethod($(pyjl_methodnum(pyjlany_getattr)), k)
^^^^^^^^^^^^^^^^^^^^^^^^^^
juliacall.JuliaError:
```
**Your system**
Please provide detailed information about your system:
- Ubuntu 25.04
- python 3.13.4
- julia 1.11.5
- PythonCall, JuliaCall: 0.9.25
```
Package Version
--------- -------
filelock 3.18.0
juliacall 0.9.25
juliapkg 0.1.17
pip 25.1.1
semver 3.0.4
```
```
>>> juliapkg.status()
JuliaPkg Status
/home/dani/.virtualenvs/deleteme/julia_env/pyjuliapkg/juliapkg.json (empty project)
Julia 1.11.5 @ /home/dani/.julia/juliaup/julia-1.11.5+0.x64.linux.gnu/bin/julia
```
**Additional context**
Add any other context about the problem here.
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 by running the multiprocessing reproducer in the issue with Python 3.13, Julia 1.11.5, and the listed JuliaCall/PythonCall versions, including PYTHON_JULIACALL_HANDLE_SIGNALS=yes. Read the related PythonCall.jl issue 77 for context. Done means the subprocess call works, or the package limitation and affected configuration are clearly documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- 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
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100