[Conda] Error: PackageNotFoundError — package not available in Conda channels — How to Fix It
Summary
The Conda error PackageNotFoundError occurs when Conda cannot locate a requested package in any of the currently configured channels. This often happens when using a minimal Conda setup (e.g., Miniconda) without conda-forge enabled, or when the package name or version is invalid. The fix is to add missing channels, search for the package explicitly, or install it via pip if it’s not hosted on Conda.
Context
When installing or updating packages, Conda queries a set of channels defined in your configuration file (.condarc). If none of these sources provide the requested package, Conda raises a PackagesNotFoundError. This issue commonly arises when creating environments from incomplete YAML files, using outdated Conda versions, or attempting to install OS-specific packages on an unsupported platform. The problem affects all major operating systems and Conda distributions (Anaconda, Miniconda, WSL).
Probable Cause
- The package isn’t hosted on any active channels in your configuration.
- Conda metadata or cache is outdated, preventing discovery of new packages.
- Typographical error in the package name or version string.
- Mixing incompatible channels (e.g., defaults and conda-forge).
- Platform mismatch — package not available for your OS or architecture.
Quick Fix
Try the following steps to locate and install the package successfully:
- Check which channels are currently active:
conda config --show channels
- If
conda-forgeis missing, add it:
conda config --add channels conda-forge
- Search for the package to confirm it exists:
conda search
- If not found, search within a specific channel:
conda search -c conda-forge
- If available, install it from that channel:
conda install -c conda-forge
- If still unavailable, use pip as a fallback:
pip install
- Update Conda to ensure access to the latest repository index:
conda update conda
Full Example
A user tries to install plotly-express with:
conda install plotly-express
and receives:
PackagesNotFoundError: The following packages are not available from current channels:
- plotly-express
They check available channels:
conda config --show channels
# Output:
# channels:
# - defaults
Adding conda-forge resolves the issue:
conda config --add channels conda-forge
conda install -c conda-forge plotly-express
If it still doesn’t exist on Conda, pip installation works:
pip install plotly-express
Pitfalls & Debug
- Symptom: Package found on Anaconda.org but not by Conda → Fix: Add its hosting channel explicitly.
- Symptom: Repeated “not found” errors → Fix: Update Conda and clear caches with
conda clean --all. - Symptom: Package works on Linux but not Windows → Fix: Check for OS-specific builds on Anaconda.org.
- Symptom: Using both defaults and conda-forge → Fix: Set strict channel priority to avoid conflicts:
conda config --set channel_priority strict
Validation & Next Steps
After configuration, confirm that the package is discoverable and installed correctly:
conda search
conda list
If your workflow involves rare or specialized Python libraries, consider enabling community-driven channels like conda-forge permanently in your setup.
Sources
Anaconda Documentation — Managing packages
conda-forge Documentation — channel setup and usage guides
Stack Overflow — “PackagesNotFoundError” troubleshooting threads
Anaconda.org — package availability and search index