The .conda file format has an uncompressed outer ZIP container, with 2 inner compressed .tar files. The initial compression format used is Zstandard (zstd). The actual format does not matter as long as libarchive supports it. The compression format may change as better algorithms are developed.
These files are called metapackages. To install a package from a .conda file use the command “conda install path/to/yourpackage.conda”. Over 400 formats can be viewed with File Viewer Plus.
Conda packages are compressed tarballs or .conda files with libraries, modules, executables and metadata, installed into the designated prefix directory. For example, to create an environment named “new-env” with Python 3.9 and some packages, use: “conda create -n new-env python==3.9 package_name1 package_name2”.
The conda package format is identical across platforms. All packages have bin, lib and info directories inside the tarball. The bin directory has binaries, lib has .py files, and info has metadata.
To select channels for one environment, put a .condarc file in its root directory or use “–env” with “conda config”. If the environment “flowers” with Python 3 is in your home directory, the path may be “/home/your_name/flowers/.condarc”.
All packages need a meta.yaml file. To build a package, turn off uploading and run “conda build .”. Use “–output” to see where the resulting file went. Then upload to Anaconda.org with “anaconda login” and “anaconda upload”.
New .conda packages from the main channel replace the .tar.bz2 legacy format. A conversion tool from .conda to .tar.bz2 will be created, so “something-1.0-0.conda” and “something-1.0-0.tar.bz2” install identical contents. Anaconda will make .tar.bz2 files until conda 4.6.x is unsupported. Conda-build will then drop .tar.bz2 support.
Conda environment definition files are in YAML format. Setup.py scripts track install requirements legacy-style. Requirements.txt works across tools but lacks environment details that Pipfile, pyproject.toml or Conda files have. Conda files contain the most configuration but only work in Conda.
Conda environments can be defined in files listing required packages and channels in YAML format. The file path can be specified in the “conda” directive like: “process foo { conda ‘/some/path/my-env.yaml’ ”’ your_command –here ”’ }”.
A Conda package is pre-built software including code, libraries and metadata. Packages are .conda or .tar.bz2 files. Channels host packages. An environment is a directory with installed packages, letting you use different package versions for projects.
Recipe files build Conda packages. “conda build” plus the recipe directory creates a package tarball like “/home/…/package-version-type_number.tar.bz2”. The naming convention is “package-version-type_number.tar.bz2”.