JuliaPkg is a Python library that allows managing Julia installations and Julia packages directly from within Python. It provides functions to add specific Julia versions, install Julia packages, and ensure they are available for use, often in conjunction with PyJulia (the `julia` Python package) for direct interaction. It aims to simplify the setup of Julia environments for Python users. The current version is 0.1.23, and it's actively maintained with regular releases.
pip install juliapkgVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to add a specific Julia version and a Julia package, then install them to set up a managed Julia environment from Python.
Ensure `juliapkg.install()` is explicitly called after any `juliapkg.add_julia()` or `juliapkg.add()` calls.
Usually, `PyJulia` will pick up the `juliapkg`-managed Julia automatically if `juliapkg.install()` has been run. If issues arise, consider setting `JULIA_BINDIR` or `JULIA_DEPOT_PATH` environment variables manually to point to the `juliapkg`-managed Julia paths before importing `julia`.
Ensure stable internet connectivity. Check proxy settings or firewall rules if in a corporate environment. Retry the installation.
Ensure you have called `juliapkg.add_julia()` with a valid version (or no arguments for the latest stable) and then `juliapkg.install()`. Check network connectivity if it's a new installation. If a specific version is requested, verify it exists and is supported.
After adding any Julia package with `juliapkg.add()`, always call `juliapkg.install()` to ensure the package is downloaded and configured in the Julia environment. If the error persists, check the output of `juliapkg.install()` for any specific Julia package installation errors.