PythonCall.jl README

The project's README from github.com/JuliaPy/PythonCall.jl. As one markdown file: README.md.

PythonCall.jl logo
PythonCall & JuliaCall

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Stable Documentation Dev Documentation Tests Codecov PkgEval

Bringing Python® and Julia together in seamless harmony:

⭐ If you like this, a GitHub star would be lovely thank you. ⭐

To get started, read the documentation.

Example 1: Calling Python from Julia

In this example, we use the Julia module PythonCall from a Pluto notebook to inspect the Iris dataset:

Seaborn example screenshot

Example 2: Calling Julia from Python

In this example we use the Python module JuliaCall from an IPython notebook to train a simple neural network:

Flux example screenshot

What about PyCall?

The existing package PyCall is another similar interface to Python. Here we note some key differences:.

PythonCall.jl (JuliaPy/PythonCall.jl)

Searching Database…

What is this?PythonCall.jl (with its Python-side counterpart JuliaCall) lets you call Python code from Julia and Julia code from Python through a symmetric interface, converting objects between the two languages.
Is this a Julia library, a Python library, or both?It's both: PythonCall is the Julia package you install to call Python, and JuliaCall is the companion Python module for calling Julia from Python.
How do I add it to my project?Read the official documentation to get started; the README does not give an inline install command.
Do I need Python installed separately, or does it manage that for me?PythonCall installs its own Python dependencies into a dedicated Conda environment per Julia project via CondaPkg, so each project gets isolated Python dependencies automatically.
How does this differ from the older PyCall package?Unlike PyCall, PythonCall supports a wider range of extensible conversions, never copies mutable objects by default (it wraps them, so edits affect the original and conversion is faster), and leaves results as Python objects rather than auto-converting to Julia.
Which OS and version combos are supported?It's tested on Windows, MacOS and Linux, requires 64-bit systems, Julia 1.10+ and Python 3.10+.
Can I convert NumPy arrays without copying data?Yes, numeric arrays like bytes, array.array, and numpy.ndarray can be converted between Julia and Python without copying, letting either language modify the underlying data in place.
Does it support Pandas DataFrames?Yes, it provides helper wrappers to interpret Python dataframes as Julia equivalents and vice versa, such as using pytable(df) to turn a Julia DataFrame into a Python Pandas DataFrame.
What do error messages look like when something fails across languages?The project advertises 'beautiful stack-traces' that span the Julia/Python boundary, making cross-language debugging clearer.
Creator
JuliaPy
Size
6.9 MB
Stars
1.1K
Age
5y
Commits · 90 Days