Registry / data / julia
library0.6.2pypypi✓ verified 84d ago

PyJulia is a Python package that provides a bridge between Python and Julia, allowing you to call Julia functions from Python and vice versa. It integrates with IPython/Jupyter. Current version is 0.6.2, supporting Python >=3.4. Release cadence is irregular, with updates for compatibility with new Julia and Python versions.

pip install julia
INSTALL
IMPORT
SIG · JULIA
J
julia
datapythonv0.6.2
Install
1.5s avg
Import
96ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.2 · 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
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.094s · 18.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.098s · 19MB
16MB installed
● package 16MB
Code
Verified usage

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

Julia
from julia import Julia
from julia.core import Julia
Public API is from julia import Julia. Direct import of core is discouraged and may break.
Main
from julia import Main

Initialize Julia and call a Julia function. Note: compiled_modules=False is often needed on first run to avoid segfaults.

from julia import Julia js = Julia(compiled_modules=False) from julia import Base Base.println("Hello from Julia")
Debug
Known issues
breakingPyJulia 0.6.0 dropped support for Python 2.7. Upgrade Python to 3.x.
fix
Use Python 3.4+
affects: >=0.6.0
gotchaIf Julia is not installed or not in PATH, from julia import Julia will raise an error. Missing Julia installation is the most common issue.
fix
Install Julia from julialang.org/downloads/ and ensure julia command is available in your terminal.
affects: all
gotchaOn Windows, compiled_modules=True (default) may cause segfaults. It is recommended to use compiled_modules=False if you encounter crashes.
fix
Initialize Julia with Julia(compiled_modules=False)
affects: all
deprecatedThe function julia.install() is no longer needed in recent versions; PyJulia automatically installs the required Julia package PyCall.jl when first used.
fix
Do not call julia.install(). Just import and use Julia().
affects: >=0.5.0
Errors
Common errors & fixes
Julia not found. Please install Julia from https://julialang.org/downloads/
Julia is not installed or not in PATH.
fix
Download and install Julia, then make sure julia command is accessible in your terminal/environment.
UnicodeEncodeError: 'ascii' codec can't encode character
PyJulia fails to encode non-ASCII characters when printing from Julia.
fix
Set environment variable PYTHONIOENCODING=utf-8
Segmentation fault (core dumped)
Compiled modules cache conflicts, often on first run or after Julia updates.
fix
Initialize Julia with Julia(compiled_modules=False) or clear ~/.julia/compiled
Upgrade
Version history
0.6.2latest on PyPI · released Dec 30, 2023
Audit
Dependencies
juliaoptionalPyJulia requires a working Julia installation. Install Julia from julialang.org/downloads/ and ensure it is in PATH.
Agent activity
8 hits · last 30 days
node
8
Resources
julia — pip install julia · libregistry