Skip to content

conda/conda-standalone

conda-standalone

A standalone conda executable built with PyInstaller.

What is this for?

conda-standalone is a self-contained conda installation produced with PyInstaller.

Warning

This product is not intended for end-users! Its main purpose is to assist constructor install the bundled conda packages.

Main features:

  • Single-file binary, named conda.exe, that can be mostly used as the regular conda command.
  • No installation required, but there are some differences (see below).
  • New subcommands (see below).

Installation

You can install conda-standalone like any other conda package. Note the binary will be only available under $PREFIX/standalone_conda/conda.exe, which is not in PATH.

$ conda create -n conda-standalone conda-standalone
$ conda activate conda-standalone
$ "$CONDA_PREFIX/standalone_conda/conda.exe" --help

You can also download the packages directly from anaconda.org and extract them manually:

Note

Use conda-package-handling's cph x command to extract .conda archives if needed.

Main differences

  • Slow startup. The binary needs to self extract into a temporary location and then run conda from there. On Windows, antivirus might delay everything even longer while the contents are analyzed.
  • No shell integration. It cannot activate or deactivate environments. You can use conda.exe run, though.
  • No implicit base environment. Always operate on an existing or new environment with --prefix / -p.
  • And maybe more. Please submit an issue if you find something that could be improved!

It also adds new subcommands not available on the regular conda:

conda.exe constructor

This subcommand is mainly used by the installers generated with constructor.

$ conda.exe constructor --help
usage: conda.exe constructor [-h] --prefix PREFIX [--extract-conda-pkgs] [--extract-tarball] [--make-menus [PKG_NAME ...]] [--rm-menus]

constructor helper subcommand

optional arguments:
  -h, --help            show this help message and exit
  --prefix PREFIX       path to the conda environment to operate on
  --extract-conda-pkgs  extract conda packages found in prefix/pkgs
  --extract-tarball     extract tarball from stdin
  --make-menus [PKG_NAME ...]
                        create menu items for the given packages; if none are given, create menu items for all packages in the environment specified by --prefix
  --rm-menus            remove menu items for all packages in the environment specified by --prefix

conda.exe python

This subcommand provides access to the Python interpreter bundled in the conda-standalone binary. It tries to emulate the same python CLI, but in practice it's just a convenience subset. The following options are supported:

$ conda.exe python --help
Usage: conda.exe python [-V] [-c cmd | -m mod | file] [arg] ...
  • -c <script>: Execute the Python code in <script>. You can also pipe things via stdin; e.g echo 'print("Hello World")' | conda.exe python.
  • -m <module>: Search sys.path for the named Python module and execute its contents as the __main__ module.
  • <file>: Execute the Python code contained in <file>.
  • -V, --version: Print the Python version number and exit.
  • No options: Enter interactive mode. Very useful for debugging. You can import all the packages bundled in the binary.

Build status

Build status pre-commit.ci status Anaconda-Server Badge
conda install defaults::conda-standalone Anaconda-Server Badge
conda install conda-forge::conda-standalone Anaconda-Server Badge
conda install conda-canary/label/dev::conda-standalone Anaconda-Server Badge