Registry / data / juliacall

juliacall

JSON →
library0.9.35pypypiunverified

juliacall is a Python library that enables seamless interoperability between Python and Julia, allowing Python code to call Julia functions, access Julia variables, and evaluate Julia code. It's part of the broader PythonCall.jl project which provides bidirectional integration. The library is actively maintained with frequent updates, often several minor releases per month.

pip install juliacall
INSTALL
IMPORT
SIG · JULIACALL
J
juliacall
datapythonv0.9.35
Install
2.3s avg
Import
Disk
17MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.35 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
1/2 runs
py 3.11
✓ —
✓ 2.2s
py 3.12
✓ —
✓ 2.55s
py 3.13
✓ —
✓ 2s
py 3.9
✓ —
1/2 runs
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Julia
from juliacall import Julia
Instantiates a new, isolated Julia session.
Main
from juliacall import Main
Provides access to the main module of the current Julia session.

This quickstart demonstrates how to initialize a Julia session, evaluate Julia code, access Julia variables, and call both built-in and custom Julia functions from Python using juliacall.

from juliacall import Julia import os # For robust demos, ensure Julia is found (optional, but good practice if not on PATH) # os.environ['JULIA_BIN'] = '/path/to/your/julia/bin/julia' # Uncomment and modify if needed try: jl = Julia() # Initializes a Julia session # Evaluate Julia code jl.seval("x = 10; y = 20") print(f"Julia variable x: {jl.x}") print(f"Julia variable y: {jl.y}") # Call a Julia function result = jl.cos(jl.pi) # Access Julia's pi and cos function print(f"cos(pi) from Julia: {result}") # Define and call a custom Julia function jl.seval("my_add(a, b) = a + b") custom_result = jl.my_add(5, 7) print(f"Custom Julia function my_add(5, 7): {custom_result}") except Exception as e: print(f"An error occurred: {e}") print("Please ensure Julia is installed and discoverable (e.g., on PATH or via JULIA_BIN env var).")
Debug
Known issues
gotchajuliacall requires a separate Julia installation on your system. It is not automatically installed via pip and will not function without a correctly configured Julia runtime.
fix
Install Julia from https://julialang.org/downloads/. Ensure Julia's `bin` directory is on your system's PATH, or set the `JULIA_BIN` environment variable to the full path of the Julia executable (e.g., `/usr/local/julia-1.8.5/bin/julia`).
affects: All versions
gotchaInstantiating `juliacall.Julia()` creates a new, isolated Julia session, which can be slow and memory-intensive upon first call. For accessing an existing Julia environment or global state, `juliacall.Main` is often more appropriate and performs better after the initial load.
fix
For global state or reusing an existing Julia session, import `Main` instead of `Julia`: `from juliacall import Main; jl = Main`. If you need isolated environments, instantiate `Julia()` once and reuse the object.
affects: All versions
gotchaAutomatic type conversions between Python and Julia can sometimes lead to unexpected behavior or performance overhead, especially for complex or mutable data structures. For example, Python lists might convert to Julia `Vector{Any}` which can be less performant than a specific `Vector{Int}`.
fix
Review the `juliacall` documentation on type conversion to understand the mappings. For critical performance or complex data, consider explicit type hints or using data structures that convert predictably, like NumPy arrays (which map to Julia arrays).
affects: All versions
Upgrade
Version history
0.9.35latest on PyPI · released Jun 8, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
juliacall — pip install juliacall · libregistry