{"id":9854,"library":"juliapkg","title":"juliapkg: Julia Version and Package Manager for Python","description":"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.","status":"active","version":"0.1.23","language":"en","source_language":"en","source_url":"https://github.com/JuliaPy/pyjuliapkg.git","tags":["julia","package management","interoperability","environment management"],"install":[{"cmd":"pip install juliapkg","lang":"bash","label":"Install juliapkg"}],"dependencies":[{"reason":"juliapkg's primary function is to manage Julia installations and packages. Without Julia itself, the library has no function.","package":"Julia (language)","optional":false},{"reason":"While juliapkg manages Julia, PyJulia is the common way to interact with the managed Julia environment from Python.","package":"julia (PyJulia)","optional":true}],"imports":[{"symbol":"juliapkg","correct":"import juliapkg"},{"symbol":"add_julia","correct":"juliapkg.add_julia(...)"},{"symbol":"add","correct":"juliapkg.add(...)"},{"symbol":"install","correct":"juliapkg.install()"}],"quickstart":{"code":"import juliapkg\nimport os\n\n# Add a specific Julia version (e.g., 1.9.4).\n# If not present, juliapkg will download and install it into a managed location.\njuliapkg.add_julia(\"1.9.4\")\n\n# Add a Julia package to the managed environment.\njuliapkg.add(\"Example\")\n\n# Install all added Julia versions and packages.\n# This ensures they are available in the Python-managed Julia environment.\njuliapkg.install()\n\nprint(\"Julia 1.9.4 and 'Example' package are installed and ready.\")\nprint(\"To use them, typically you would interface with PyJulia:\")\nprint(\"  from julia import Julia\")\nprint(\"  jl = Julia()\")\nprint(\"  jl.eval('using Example; Example.hello()')\")","lang":"python","description":"Demonstrates how to add a specific Julia version and a Julia package, then install them to set up a managed Julia environment from Python."},"warnings":[{"fix":"Ensure `juliapkg.install()` is explicitly called after any `juliapkg.add_julia()` or `juliapkg.add()` calls.","message":"Always call `juliapkg.install()` after adding new Julia versions or packages. Forgetting this step will result in the Julia environment not being updated, and newly added items will not be available.","severity":"gotcha","affected_versions":"All versions"},{"fix":"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`.","message":"When using `juliapkg` with `PyJulia` (the `julia` Python package), ensure `PyJulia` is configured to use the Julia installation managed by `juliapkg`. By default, `PyJulia` will try to find a Julia executable in your PATH or via `JULIA_PATH` / `JULIA_DEPOT_PATH` environment variables. `juliapkg` sets up the environment variables correctly for its managed Julia, but explicit setup might be needed if you have multiple Julia installations.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure stable internet connectivity. Check proxy settings or firewall rules if in a corporate environment. Retry the installation.","message":"Network connectivity issues can prevent Julia versions or packages from being downloaded and installed. This can manifest as stalled downloads or connection errors during `juliapkg.add_julia()` or `juliapkg.install()`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"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.","cause":"`juliapkg` could not find or successfully install a Julia executable for the requested version, or a previously managed Julia installation became inaccessible.","error":"Julia executable not found. Please install Julia."},{"fix":"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.","cause":"A Julia package was added via `juliapkg.add(\"XXX\")` but `juliapkg.install()` was not called afterward, or the Julia environment wasn't properly re-activated, or the package failed to install.","error":"ERROR: LoadError: ArgumentError: Package XXX not found in current path."}]}