[ANN] CondaPkg.jl: Add Conda dependencies to your Julia project

Conda is a cross-platform package manager, originally used to manage the Anaconda Python distribution, but also handles non-Python packages too.

CondaPkg.jl is a bit like Pkg but for managing Conda dependencies.

This provides an convenient means to add binary dependencies to your Julia project. It can be used as an alternative to artifacts, JLL packages or manual downloading. It is particularly useful for Python dependencies.

Example

To declare dependencies, you simply create a CondaPkg.toml file in your Julia project, such as:

[deps]
perl = "5.*"

Alternatively, we provide interactive functions to add and remove dependencies, such as:

CondaPkg.add("perl", version="5.*")

Now you can run programs in the environment like so:

CondaPkg.withenv() do
    run(`perl -e 'print("Hello world!\n")'`)
end

Features

  • Automatically resolves your Conda dependencies.
  • Uses a different Conda environment for each Julia environment, so avoiding version conflicts.
  • Also handles Pip dependencies, and maybe more kinds in the future.
  • Behind the scenes we use MicroMamba, the new fast reimplementation of Conda. Installation of this is managed by the new MicroMamba.jl package.
13 Likes