Conda.CondaModule

The Conda module provides access to the conda packages manager to install binary dependencies of other Julia packages.

The main functions in Conda are:

  • Conda.add(package): install a package;
  • Conda.rm(package): remove (uninstall) a package;
  • Conda.update(): update all installed packages to the latest version;
  • Conda.list(): list all installed packages.
  • Conda.add_channel(channel): add a channel to the list of channels;
  • Conda.channels(): get the current list of channels;
  • Conda.rm_channel(channel): remove a channel from the list of channels;

```

Conda._get_conda_envFunction
_get_conda_env(env::Union{AbstractString,Symbol}=ROOTENV)

Get a sanitized copy of the environment ENV for the Conda environment named env (defaulting to ROOTENV), in order to run the conda program.

In particular, this removes any environment variable whose named begins with CONDA or PYTHON, which might cause conda to have unexpected behaviors.

Conda._install_condaFunction
_install_conda(env::Union{AbstractString,Symbol}, force::Bool=false)

Install miniconda/miniforge into env if it hasn't been installed yet; _install_conda(env, true) re-installs Conda even if it has already been installed.

Conda._installed_packagesFunction
_installed_packages(env::Union{AbstractString,Symbol}=ROOTENV)

Return an array of names of all installed packages for the conda environment env (defaulting to ROOTENV).

Conda._installed_packages_dictFunction
_installed_packages_dict(env::Union{AbstractString,Symbol}=ROOTENV)

Return a list of all installed packages for the conda environment env (defaulting to ROOTENV) as a dictionary mapping package names to tuples of (version_number, fullname).

Conda._pipMethod
_pip(env::Union{AbstractString,Symbol}=ROOTENV)

Return the path of the pip command for the conda environment env (defaulting to ROOTENV), installing pip if necessary.

Conda._quietMethod
_quiet()

Returns conda command-line argument to suppress progress bar in continuous integration (CI) environments.

Conda.addFunction
add(pkg, env::Union{AbstractString,Symbol}=ROOTENV)

Installs new package(s) pkg into the conda environment env (defaulting to ROOTENV). pkg can be a string giving the name of a single package, or a vector of strings giving the names of several packages.

Conda.add_channelFunction
add_channel(channel::AbstractString, env::Union{AbstractString,Symbol}=ROOTENV)

Add channel to the list of channels used to search packages in the conda environment env (defaulting to ROOTENV).

Conda.bin_dirMethod
bin_dir(env::Union{AbstractString,Symbol})

Directory for the executable files installed with the packages for the environment named env.

Conda.channelsFunction
channels(env::Union{AbstractString,Symbol}=ROOTENV)

Return an array of channels used to search packages in the conda environment env (defaulting to ROOTENV).

Conda.cleanMethod
clean(;
    debug=false, index=true, locks=false, tarballs=true, packages=true, sources=false
)

Runs conda clean -y with the specified flags.

Conda.conda_rcMethod
conda_rc(env::Union{AbstractString,Symbol}=ROOTENV)

Path of the condarc file for the environment named env, defaulting to ROOTENV.

Conda.createMethod
create(env::Union{AbstractString,Symbol})

Create a new conda environment env (running conda create).

Conda.existsFunction
exists(package::AbstractString, env::Union{AbstractString,Symbol}=ROOTENV)

Return whether the given package exists for the conda environment env (defaulting to ROOTENV). A particular version may be specified by passing "package==version" as the package string.

Conda.export_listFunction
export_list(filepath, env=/juliateam/.julia/conda/3/x86_64)
export_list(io, env=/juliateam/.julia/conda/3/x86_64)

List all installed packages for the conda environment env (defaulting to ROOTENV) and write them to an export filepath or I/O stream io, mainly for use the import_list function.

Conda.import_listFunction

" importlist(filename, env=ROOTENV; channels=String[]) importlist(io, env=ROOTENV; channels=String[])

Create a new environment env (defaulting to ROOTENV) with various channels and a packages list file filename (or I/O stream io)

Conda.lib_dirMethod
lib_dir(env::Union{AbstractString,Symbol})

Directory for the shared libraries installed with the packages for the environment named env. To get this directory for the default root environment ROOTENV, use LIBDIR.

Conda.listFunction
list(env::Union{AbstractString,Symbol}=ROOTENV)

List all installed packages for the conda environment env (defaulting to ROOTENV) to standard output (stdout).

Conda.parsecondaFunction

Run conda command with environment variables set and return the json output as a julia object

Conda.pipFunction
pip(cmd::AbstractString, pkg, env::Union{AbstractString,Symbol}=ROOTENV)

Run the pip command cmd for the package(s) pkg in the conda environment env (defaulting to ROOTENV). pkg can be a string giving the name of a single package, or a vector of strings giving the names of several packages.

Conda.pip_interopFunction
pip_interop(enabled::Bool, env::Union{AbstractString,Symbol}=ROOTENV)

Sets the pip_interop_enabled value to enabled for the conda environment env (defaulting to ROOTENV)

If enabled==true, then the conda solver is allowed to interact with non-conda-installed python packages.

Conda.pip_interopFunction
pip_interop(env::Union{AbstractString,Symbol}=ROOTENV)

Gets the pip_interop_enabled value from the conda config for the conda environment env (defaulting to ROOTENV)

Conda.prefixMethod
prefix(path::String)

Checks that path is a valid directory for a Conda environment, and returns path.

Conda.prefixMethod
prefix(name::Symbol)

Prefix for installation of the environment name.

Conda.python_dirMethod
python_dir(env::Union{AbstractString,Symbol})

Directory where the python command lives for the environment named env. To get this directory for the default root environment ROOTENV, use PYTHONDIR.

Conda.rmFunction
rm(pkg, env::Union{AbstractString,Symbol}=ROOTENV)

Uninstall package(s) pkg from the conda environment env (defaulting to ROOTENV). pkg can be a string giving the name of a single package, or a vector of strings giving the names of several packages.

Conda.rm_channelFunction
rm_channel(channel::AbstractString, env::Union{AbstractString,Symbol}=ROOTENV)

Remove channel from the list of channels used to search packages in the conda environment env (defaulting to ROOTENV).

Conda.runcondaFunction
runconda(args::Cmd, env::Union{AbstractString,Symbol}=ROOTENV)

Run the conda program with the given arguments args, i.e. run conda $args, in the given environment env (defaulting to ROOTENV).

(Installs conda if necessary, and sanitizes the runtime environment using _get_conda_env.)

Run conda command with environment variables set.

Conda.script_dirMethod
script_dir(env::Union{AbstractString,Symbol})

Directory for the Python scripts installed with the packages for the environment named env. To get this directory for the default root environment ROOTENV, use SCRIPTDIR.

Conda.searchFunction
search(matchspec::AbstractString, env::Union{AbstractString,Symbol}=ROOTENV;
       version::Union{AbstractString,VersionNumber,Nothing}=nothing)

Search the list of available conda packages for the string matchspec, for the conda environment env (defaulting to ROOTENV), and return the result as an array of package names.

If the optional keyword version is passed, then only packages having a match for this version number will be returned.

Conda.updateFunction
update(env::Union{AbstractString,Symbol}=ROOTENV)

Update all installed packages for the conda environment env (defaulting to ROOTENV).

Conda.versionFunction
version(name::AbstractString, env::Union{AbstractString,Symbol}=ROOTENV)

Return the installed version of the package name (as a VersionNumber for the conda environment env (defaulting to ROOTENV).