How to fix the "PackageNotFoundError: Package not found" error when using conda to install Python packages?

Asked 7 months ago

I've encountered the frustrating "PackageNotFoundError" while trying to install Python packages using conda, and it's blocking my project progress. How can I troubleshoot and resolve this error to successfully install the required packages?

Samuel Hobbs

Tuesday, October 03, 2023

In most cases, the "PackageNotFoundError" primarily occurs due to issues with the package channels and environment setup. First, ensure your `conda` installation is up-to-date:

conda update -n base -c defaults conda

Then, activate the conda environment where you intend to install the package:

conda activate your_environment_name

Make sure to verify that the package you're trying to install is available in the channels you're searching. Also, try the `conda-forge` channel, which is a community-driven collection of packages.

Finally, if `conda` can't resolve the issue, consider using `pip` to install the package.





Write an answer...

Cancel

Please follow our  Community Guidelines

Can't find what you're looking for?