Registry / devops / ensureconda

ensureconda

JSON →
library1.6.0pypypi✓ verified 85d ago

Lightweight bootstrapper for a conda executable. Automatically downloads and installs conda or mamba (including conda-standalone) if not already present. Current version 1.6.0, requires Python >=3.8. Active maintenance with occasional releases.

pip install ensureconda
INSTALL
IMPORT
SIG · ENSURECONDA
E
ensureconda
devopspythonv1.6.0
Install
2.6s avg
Import
795ms
Disk
27MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.846s · 24.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.6s · import 0.744s · 25MB
27MB installed
● package 27MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ensureconda
import ensureconda
Direct import; primary entry point is a function ensureconda()

Basic usage: ensureconda() finds or installs conda. Pass mamba=True for mamba.

import ensureconda # Returns path to conda executable (downloads if needed) conda_path = ensureconda.ensureconda() print(conda_path) # Or use a specific package manager mamba_path = ensureconda.ensureconda(mamba=True) print(mamba_path)
ensureconda --version
Debug
Known issues
breakingIn v1.6.0, conda-standalone is downloaded from conda-forge instead of the Anaconda channel. To revert to Anaconda channel, set environment variable ENSURECONDA_CONDA_STANDALONE_CHANNEL=anaconda or downgrade to v1.5.
fix
export ENSURECONDA_CONDA_STANDALONE_CHANNEL=anaconda before calling ensureconda.
affects: >=1.6.0
gotchaensureconda may download large binaries (conda-standalone). Ensure network access and sufficient disk space, especially in CI environments.
fix
Pre-install conda/mamba in the environment or use a persistent cache.
affects: all
deprecatedThe conda-standalone from the Anaconda channel is no longer the default since v1.6.0. The new default is conda-forge, which may have different behavior.
fix
Check compatibility with conda-forge's conda-standalone or override channel.
affects: 1.6.0
Errors
Common errors & fixes
AttributeError: module 'ensureconda' has no attribute 'ensureconda'
Importing the package incorrectly or using an old version that uses a different API.
fix
Use `import ensureconda` and call `ensureconda.ensureconda()` or upgrade to >=1.4.0.
ConnectionError: Unable to download conda-standalone from ...
Network issues or the download URL changed (especially after v1.6.0 default channel switch).
fix
Set ENSURECONDA_CONDA_STANDALONE_CHANNEL to anaconda or conda-forge, or manually install conda.
ValueError: Unsupported platform
Running on a platform for which conda-standalone is not available (e.g., 32-bit).
fix
Install conda/mamba via other means, or use a compatible platform.
Upgrade
Version history
1.6.0latest on PyPI · released Oct 6, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
ensureconda — pip install ensureconda · libregistry