Issues with JuliaCall, JuliaPkg versioning, and mysterious JuliaCall crashes

Hi @cjdoris , I’m having issues with several items around JuliaCall / JuliaPkg and hoping you might have some pointers.

High level summary:

  • Mysterious process terminations when using JuliaCall. Tried to resovle by trying different versions of Julia, but didn’t help.
  • Difficult to get JuliaPkg and/or JuliaCall to use the version of Julia that I want them to. The various mechanisms advertised in the API don’t necessarily work as advertised, or I’m using them wrong, or a combination both.

I started digging into the source of JuliaPkg but had some difficulty piecing together the full picture, I figured it was the right time to ask the package author.

Details of various issues

Mysterious process terminations when using JuliaCall

Here’s my MWE:

# demo.py
from multiprocessing import Pool

def _setup():
    from juliacall import Main as jl


class JuliaInterface:
    def __init__(self) -> None:
        self._process_pool = Pool(1)
        self._process_pool.apply(_setup)

if __name__ == "__main__":
    julia_interface = JuliaInterface()
    # Print off juliapkg info
    import juliapkg as jp
    print(jp.status())

Output:

$ python demo.py
JuliaPkg Status
/Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/juliapkg.json (empty project)
Julia 1.9.1 @ /Users/kydonian/.julia/juliaup/julia-1.9.1+0.aarch64.apple.darwin14/bin/julia
None

[58748] signal (15): Terminated: 15
in expression starting at none:0
gc_collect_main at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
gc_collect_with_callback at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
PyGC_Collect at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
Py_FinalizeEx at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
Py_Exit at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
handle_system_exit at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
_PyErr_PrintEx at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
PyRun_SimpleStringFlags at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
Py_RunMain at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
Py_BytesMain at /opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/Python (unknown line)
unknown function (ip: 0x0)
Allocations: 676387 (Pool: 675662; Big: 725); GC: 1

It seems that something is crashing upon exit.

Versioning info:

$ python --version
Python 3.10.11
$ python

# Julia info from above
Julia 1.9.1 @ /Users/kydonian/.julia/juliaup/julia-1.9.1+0.aarch64.apple.darwin14/bin/julia

# OS: MacOS 13.2, Arm64 (Apple Silicon) arch
kern.version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:19 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6020
kern.ostype: Darwin
kern.osrelease: 22.5.0
kern.osrevision: 199506

FAQ

  • Why are you importing juliacall in a thread?

    This was motivated by Julia’s can’t-call-from-different-threads known issue. In my particular application, if I just imported JuliaCall as any other Python module, Python seemed to call juliacall from different threads, which induced segfaults. By isolating all of my juliacall calls / imports to a single process I was able to fix these issues, until this issue popped up again recently. I know threads != processes, but this approach seemed to help preventing other mysterious crashes.

JuliaPkg version control doesn’t seem to work?

The issues mentioned above popped up again after Julia 1.9.1 was released, so I wondered if these failures might be related to versioning (as you will see, I eventually got it to run with the version I wanted it to, but the crashes were unfortunately not resolved).

I wanted to run my code with 1.8.5. Checking the JuliaCall documentation, I was led to JuliaPkg, and tried a variety of mechanisms to get juliacall to use that version of Julia. I was mostly unsuccessful and got some confusing results.

My modified script:

# demo.py
from multiprocessing import Pool

def _setup():
    from juliacall import Main as jl
    print(f"JuliaCall actually uses Julia version {jl.VERSION}")

class JuliaInterface:
    def __init__(self) -> None:
        self._process_pool = Pool(1)
        self._process_pool.apply(_setup)


if __name__ == "__main__":
    print("CHECKPOINT 1")
    import juliapkg as jp
    print("CHECKPOINT 2")
    print(jp.status())
    print("CHECKPOINT 3")
    print(jp.executable())
    print("CHECKPOINT 4")
    print(jp.project())
    print("CHECKPOINT 5")
    jp.resolve()
    print("CHECKPOINT 6")
    print(jp.status())
    print("CHECKPOINT 7")
    print(jp.executable())
    print("CHECKPOINT 8")
    print(jp.project())
    print("CHECKPOINT 9")
    julia_interface = JuliaInterface()
    print("CHECKPOINT 10")

I tried to explicitly narrow the Julia version by specifying juliapkg-exe and juliapkg-offline=yes:

python -X juliapkg-offline=yes -X juliapkg-exe=/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia demo.py

However, it didn’t really function as expected. Notes inline tagged with # NOTE:.

Output:

CHECKPOINT 1
CHECKPOINT 2
JuliaPkg Status
/Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/juliapkg.json (empty project)
Not resolved (resolve for more information)
None
CHECKPOINT 3
[juliapkg] Locating Julia ^1.8.5

# NOTE: Ok, so far so good. Uses the version of julia I pointed to.

[juliapkg] Using Julia 1.8.5 at /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
[juliapkg] Using Julia project at /Users/kydonian/.julia/environments/pyjuliapkg
/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
CHECKPOINT 4
/Users/kydonian/.julia/environments/pyjuliapkg
CHECKPOINT 5
CHECKPOINT 6
JuliaPkg Status
/Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/juliapkg.json (empty project)

# NOTE: So far so good; resolves to the expected version.

Julia 1.8.5 @ /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
None
CHECKPOINT 7
/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
CHECKPOINT 8
/Users/kydonian/.julia/environments/pyjuliapkg
CHECKPOINT 9

# NOTE: Now I try to actually use juliacall, and it seems to go off the rails. JuliaCall seems to ignore the JuliaPkg configuration just confirmed.

[juliapkg] Locating Julia ^1.8.5

# NOTE: What? Why is it querying for Julia versions if I specified juliapkg-offline=yes ?

[juliapkg] Querying Julia versions from https://julialang-s3.julialang.org/bin/versions.json

# NOTE: Ignores the version I specified to the juliapkg arguments and downloads 1.9.1.

[juliapkg] WARNING: About to install Julia 1.9.1 to /Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/install.
[juliapkg]   If you use juliapkg in more than one environment, you are likely to have Julia
[juliapkg]   installed in multiple locations. It is recommended to install JuliaUp
[juliapkg]   (https://github.com/JuliaLang/juliaup) or Julia (https://julialang.org/downloads)
[juliapkg]   yourself.
[juliapkg] Downloading Julia from https://julialang-s3.julialang.org/bin/mac/aarch64/1.9/julia-1.9.1-macaarch64.dmg
             downloaded 15.6 MB of 114.3 MB
             downloaded 30.3 MB of 114.3 MB
             downloaded 44.9 MB of 114.3 MB
             downloaded 59.4 MB of 114.3 MB
             downloaded 73.8 MB of 114.3 MB
             downloaded 88.4 MB of 114.3 MB
             downloaded 103.0 MB of 114.3 MB
             download complete
[juliapkg] Verifying download
[juliapkg] Installing Julia 1.9.1 to /Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/install
[juliapkg] Using Julia 1.9.1 at /Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/install/bin/julia
[juliapkg] Using Julia project at /Users/kydonian/.julia/environments/pyjuliapkg
[juliapkg] Installing packages:
           julia> import Pkg
           julia> Pkg.add([Pkg.PackageSpec(name="PythonCall", uuid="6099a3de-0909-46bc-b1f4-468b9a2dfc0d")])
           julia> Pkg.resolve()
           julia> Pkg.precompile()
   Resolving package versions...
    Updating `~/.julia/environments/pyjuliapkg/Project.toml`
  [6099a3de] + PythonCall v0.9.13
    Updating `~/.julia/environments/pyjuliapkg/Manifest.toml`
  [992eb4ea] + CondaPkg v0.2.18
  [9a962f9c] + DataAPI v1.15.0
  [e2d170a0] + DataValueInterfaces v1.0.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.4.1
  [0f8b85d8] + JSON3 v1.13.1
  [1914dd2f] + MacroTools v0.5.10
  [0b3b1443] + MicroMamba v0.1.13
  [bac558e1] + OrderedCollections v1.6.0
  [69de0a69] + Parsers v2.7.1
  [fa939f87] + Pidfile v1.3.0
  [aea7be01] + PrecompileTools v1.1.2
  [21216c6a] + Preferences v1.4.0
  [6099a3de] + PythonCall v0.9.13
  [ae029012] + Requires v1.3.0
  [6c6a2e73] + Scratch v1.2.0
  [856f2bd8] + StructTypes v1.10.0
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.10.1
  [e17b2a0c] + UnsafePointers v1.0.0
⌅ [f8abcde7] + micromamba_jll v1.4.1+0
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL v0.6.3
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.9.0
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll v1.0.2+0
  [deac9b47] + LibCURL_jll v7.84.0+0
  [29816b5a] + LibSSH2_jll v1.10.2+0
  [c8ffd9c3] + MbedTLS_jll v2.28.2+0
  [14a3606d] + MozillaCACerts_jll v2022.10.11
  [4536629a] + OpenBLAS_jll v0.3.21+4
  [83775a58] + Zlib_jll v1.2.13+0
  [8e850b90] + libblastrampoline_jll v5.8.0+0
  [8e850ede] + nghttp2_jll v1.48.0+0
  [3f19e933] + p7zip_jll v17.4.0+0
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
  No Changes to `~/.julia/environments/pyjuliapkg/Project.toml`
  No Changes to `~/.julia/environments/pyjuliapkg/Manifest.toml`
# Indeed, JuliaCall is using the wrong version now.
JuliaCall actually uses Julia version 1.9.1
CHECKPOINT 10

# NOTE: Ommitted, same termination crash as before.

Re-running the script with the exact same command (using the python -X arguments), I get the same results, except of course the 1.9.1 version is already downloaded.

$ python -X juliapkg-offline=yes -X juliapkg-exe=/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia demo.py
CHECKPOINT 1
CHECKPOINT 2
JuliaPkg Status
/Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/juliapkg.json (empty project)
Not resolved (resolve for more information)
None
CHECKPOINT 3
[juliapkg] Locating Julia ^1.8.5
[juliapkg] Using Julia 1.8.5 at /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
[juliapkg] Using Julia project at /Users/kydonian/.julia/environments/pyjuliapkg
/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
CHECKPOINT 4
/Users/kydonian/.julia/environments/pyjuliapkg
CHECKPOINT 5
CHECKPOINT 6
JuliaPkg Status
/Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/juliapkg.json (empty project)
Julia 1.8.5 @ /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
None
CHECKPOINT 7
/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
CHECKPOINT 8
/Users/kydonian/.julia/environments/pyjuliapkg
CHECKPOINT 9
[juliapkg] Locating Julia ^1.8.5
[juliapkg] Querying Julia versions from https://julialang-s3.julialang.org/bin/versions.json
[juliapkg] Using Julia 1.9.1 at /Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/install/bin/julia
[juliapkg] Using Julia project at /Users/kydonian/.julia/environments/pyjuliapkg
[juliapkg] Installing packages:
           julia> import Pkg
           julia> Pkg.add([Pkg.PackageSpec(name="PythonCall", uuid="6099a3de-0909-46bc-b1f4-468b9a2dfc0d")])
           julia> Pkg.resolve()
           julia> Pkg.precompile()
   Resolving package versions...
    Updating `~/.julia/environments/pyjuliapkg/Project.toml`
  [6099a3de] + PythonCall v0.9.13
    Updating `~/.julia/environments/pyjuliapkg/Manifest.toml`
  [992eb4ea] + CondaPkg v0.2.18
  [9a962f9c] + DataAPI v1.15.0
  [e2d170a0] + DataValueInterfaces v1.0.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.4.1
  [0f8b85d8] + JSON3 v1.13.1
  [1914dd2f] + MacroTools v0.5.10
  [0b3b1443] + MicroMamba v0.1.13
  [bac558e1] + OrderedCollections v1.6.0
  [69de0a69] + Parsers v2.7.1
  [fa939f87] + Pidfile v1.3.0
  [aea7be01] + PrecompileTools v1.1.2
  [21216c6a] + Preferences v1.4.0
  [6099a3de] + PythonCall v0.9.13
  [ae029012] + Requires v1.3.0
  [6c6a2e73] + Scratch v1.2.0
  [856f2bd8] + StructTypes v1.10.0
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.10.1
  [e17b2a0c] + UnsafePointers v1.0.0
⌅ [f8abcde7] + micromamba_jll v1.4.1+0
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL v0.6.3
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.9.0
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll v1.0.2+0
  [deac9b47] + LibCURL_jll v7.84.0+0
  [29816b5a] + LibSSH2_jll v1.10.2+0
  [c8ffd9c3] + MbedTLS_jll v2.28.2+0
  [14a3606d] + MozillaCACerts_jll v2022.10.11
  [4536629a] + OpenBLAS_jll v0.3.21+4
  [83775a58] + Zlib_jll v1.2.13+0
  [8e850b90] + libblastrampoline_jll v5.8.0+0
  [8e850ede] + nghttp2_jll v1.48.0+0
  [3f19e933] + p7zip_jll v17.4.0+0
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
  No Changes to `~/.julia/environments/pyjuliapkg/Project.toml`
  No Changes to `~/.julia/environments/pyjuliapkg/Manifest.toml`

# NOTE: Again, uses the wrong Julia version.

JuliaCall actually uses Julia version 1.9.1
CHECKPOINT 10

# NOTE: Ommitted, same termination crash as before.

Now, if I re-run the script but set the juliapkg options with environment variables, all the versions are correct. So it seems that even though JuliaPkg is receiving its instructions about which Julia version to use, JuliaCall is not. Perhaps this is intended behavior, but it surprised me since the JuliaCall documentation says it uses JuliaPkg under the hood, so I figured it would all pass through. Either way, it’s especially surprising that using the python -X approach doesn’t pass through the version to JuliaCall, but the env var approach does.

Note that the terminal crash that started off this thread still occurs, so my hope that the crash would be fixed by addressing the versioning didn’t pan out :frowning:

For this particular test, I added

print("env var PYTHON_JULIAPKG_EXE: ", os.environ['PYTHON_JULIAPKG_EXE'])
print("env var PYTHON_JULIAPKG_OFFLINE: ", os.environ['PYTHON_JULIAPKG_OFFLINE'])

before checkpoint 1 just to sanity-check they were getting set as expected.

$ export PYTHON_JULIAPKG_EXE=/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia; export PYTHON_JULIAPKG_OFFLINE=yes; python demo.py

# NOTE: env vars set as expected

env var PYTHON_JULIAPKG_EXE:  /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
env var PYTHON_JULIAPKG_OFFLINE:  yes
CHECKPOINT 1
CHECKPOINT 2
JuliaPkg Status
/Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/juliapkg.json (empty project)
Julia 1.8.5 @ /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
None
CHECKPOINT 3
/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
CHECKPOINT 4
/Users/kydonian/.julia/environments/pyjuliapkg
CHECKPOINT 5
CHECKPOINT 6
JuliaPkg Status
/Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/juliapkg.json (empty project)
Julia 1.8.5 @ /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
None
CHECKPOINT 7
/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia
CHECKPOINT 8
/Users/kydonian/.julia/environments/pyjuliapkg
CHECKPOINT 9

# NOTE: Finally, the correct Julia executable.

JuliaCall actually uses Julia version 1.8.5 at /Applications/Julia-1.8.app/Contents/Resources/julia/bin
CHECKPOINT 10

# NOTE: Ommitted, same termination crash as before :(

Similar Julia version control issues using the provided JuliaCall interface

As a further test, I tried specifying the version using JuliaCall arguments. JuliaCall also failed to use the right version of Julia.

Simplified script:

# demo2.py
from multiprocessing import Pool

def _setup():
    from juliacall import Main as jl
    print(f"JuliaCall actually uses Julia version {jl.VERSION} at {jl.Sys.BINDIR}")


class JuliaInterface:
    def __init__(self) -> None:
        self._process_pool = Pool(1)
        self._process_pool.apply(_setup)

if __name__ == "__main__":
    julia_interface = JuliaInterface()

Output:

$ python -X juliacall-home=/Applications/Julia-1.8.app/Contents/Resources/julia/bin demo2.py
JuliaCall actually uses Julia version 1.9.1 at /Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/install/bin

# NOTE: Ommitted, same termination crash as before.

And using the environment variable approach:

$ export JULIACALL_BINDIR=/Applications/Julia-1.8.app/Contents/Resources/julia/bin; python demo2.py
JuliaCall actually uses Julia version 1.9.1 at /Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/install/bin

# NOTE: Ommitted, same termination crash as before.

One final mysterious crash

I know this is a massive post already, but I wanted to provide as much information as possible about the issues I’m seeing, and I ran into an additional mysterious crash that I though would also be worth mentioning, just in case it sheds any light on some funky thing I’ve got wrong with my setup.

Running this very simple script (from a fresh terminal):

# demo3.py
if __name__ == "__main__":
    from juliacall import Main as jl
    print(f"JuliaCall actually uses Julia version {jl.VERSION} at {jl.Sys.BINDIR}")

Using the env var arguments, we get the wrong version of Julia, as before:

$ export JULIACALL_BINDIR=/Applications/Julia-1.8.app/Contents/Resources/julia/bin; python demo3.py
JuliaCall actually uses Julia version 1.9.1 at /Users/kydonian/.julia/environments/pyjuliapkg/pyjuliapkg/install/bin

# NOTE: No termination crash in this particular instance, but this method seems unsafe for general use since it doesn't run JuliaCall in its own process, which experience has led me to believe is necessary for stability / preventing other kinds of crashes.

Again, from another fresh terminal, I try the python -X argument approach and get a different kind of crash.

$ python -X juliacall-home=/Applications/Julia-1.8.app/Contents/Resources/julia/bin demo3.py
ERROR: could not load symbol "jl_tls_offset_image":
dlsym(0x88482360, jl_tls_offset_image): symbol not found

An interesting note here: when I tried all of these experiments with Python 3.9.16, this final crash did not occur.

Request

Any insight you can give into the source of these issues and how to address them would be much appreciated!

  • Any insight into what might be causing the crashes I’m seeing, or how to address them? As you can see, I already am trying the run-Julia-in-a-separate-python-process approach and that didn’t seem to address it, and running it outside of a contained process seemed to make matters variously worse or better, but my experience with JuliaCall makes me feel this is risky.
  • Am I using the JuliaCall/JuliaPkg version specification arguments correctly? Is there a bug in these packages that’s leading to the version mismatches I’m seeing?
  • Any best practices for how to use and deploy JuliaCall / JuliaPkg to reduce these sorts of issues? Different process / threading isolation mechanisms? More compatible python versions?

Other notes:

  • I did try using juliaup as well, but omitted those trials in this post since it’s long already. Very similar julia version control issues.
  • Also tried with Python 3.9.16 and got the same issues, except that the final jl_tls_offset_image issue did not occur.