Conda.Conda
— ModuleThe 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_env
— Function_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_conda
— Function_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_packages
— Function_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_dict
— Function_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._installer_url
— Method_installer_url()
Get the miniconda/miniforge installer URL.
Conda._pip
— Method_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._quiet
— Method_quiet()
Returns conda
command-line argument to suppress progress bar in continuous integration (CI) environments.
Conda.add
— Functionadd(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_channel
— Functionadd_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_dir
— Methodbin_dir(env::Union{AbstractString,Symbol})
Directory for the executable files installed with the packages for the environment named env
.
Conda.channels
— Functionchannels(env::Union{AbstractString,Symbol}=ROOTENV)
Return an array of channels used to search packages in the conda environment env
(defaulting to ROOTENV
).
Conda.clean
— Methodclean(;
debug=false, index=true, locks=false, tarballs=true, packages=true, sources=false
)
Runs conda clean -y
with the specified flags.
Conda.conda_rc
— Methodconda_rc(env::Union{AbstractString,Symbol}=ROOTENV)
Path of the condarc file for the environment named env
, defaulting to ROOTENV
.
Conda.create
— Methodcreate(env::Union{AbstractString,Symbol})
Create a new conda environment env
(running conda create
).
Conda.exists
— Functionexists(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_list
— Functionexport_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_list
— Function" 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_dir
— Methodlib_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.list
— Functionlist(env::Union{AbstractString,Symbol}=ROOTENV)
List all installed packages for the conda environment env
(defaulting to ROOTENV
) to standard output (stdout
).
Conda.parseconda
— FunctionRun conda command with environment variables set and return the json output as a julia object
Conda.pip
— Functionpip(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_interop
— Functionpip_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_interop
— Functionpip_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.prefix
— Methodprefix(path::String)
Checks that path
is a valid directory for a Conda environment, and returns path
.
Conda.prefix
— Methodprefix(name::Symbol)
Prefix for installation of the environment name
.
Conda.python_dir
— Methodpython_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.rm
— Functionrm(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_channel
— Functionrm_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.runconda
— Functionrunconda(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_dir
— Methodscript_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.search
— Functionsearch(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.update
— Functionupdate(env::Union{AbstractString,Symbol}=ROOTENV)
Update all installed packages for the conda environment env
(defaulting to ROOTENV
).
Conda.version
— Functionversion(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
).