I am trying to use conda to manage the environment. Most of the time, I can simply do conda install foo instead of pip install foo. However, in some cases (happens rarely), conda install foo can run into PackagesNotFoundError error. Why is that?
This is a concrete example. conda install pygal works fine. However, one of its optional dependency pygal_maps_world (for map support), won't be able to install via conda directly.
$ conda install pygal_maps_world
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- pygal_maps_world
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/osx-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/pro/osx-64
- https://repo.anaconda.com/pkgs/pro/noarch
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
I tried pip install pygal_maps_world based on http://www.pygal.org/en/stable/documentation/types/maps/pygal_maps_world.html. And then the exportd ymal file looks like this:
name: foo_env
channels:
- defaults
- conda-forge
dependencies:
- ... some other libraries
- zlib=1.2.11=h1de35cc_3
- zstd=1.3.7=h5bba6e5_0
- pip:
- pygal-maps-world==1.0.2
Look at the bottom ^^^, it added a - pip session. Why is that? How do we find out which library can be installed via conda directly and which one of them needs to go through pip?