例如,说我要安装bioconda软件包gapfiller
。
conda new -n gapfiller -c bioconda -c conda-forge gapfiller
如果运行上述命令,则会出现以下错误:
PackagesNotFoundError: The following packages are not available from current channels:
- boost[version='>=1.57.0,<1.57.1.0a0']
Current channels:
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
在这一点上,下一步应该做什么以确定我需要开始包括哪个渠道?
我尝试查看meta.yml
for the package,但这仅列出了gapfiller
所依赖的软件包,而不是可以找到它们的渠道。 ve也尝试过conda search boost
,但当然只能在我当前的频道中返回(不兼容)结果,它不会告诉我如何查找新频道:
$ conda search boost
Loading channels: done
# Name Version Build Channel
boost 1.65.1 py27_4 pkgs/main
boost 1.65.1 py27h0eb07c9_3 pkgs/main
boost 1.65.1 py35_4 pkgs/main
boost 1.65.1 py35heb9229b_3 pkgs/main
boost 1.65.1 py36_4 pkgs/main
boost 1.65.1 py36hfaba7b9_3 pkgs/main
boost 1.67.0 py27_4 pkgs/main
boost 1.67.0 py35_4 pkgs/main
boost 1.67.0 py36_4 pkgs/main
boost 1.67.0 py37_4 pkgs/main
boost 1.71.0 py38_0 pkgs/main
如何确定用于解决PackagesNotFoundError
的正确渠道?
答案 0 :(得分:2)
通常,当涉及旧软件包版本时,它们降级为the free channel which was taken off the defaults metachannel last year。有几种方法可以将其重新添加(例如,配置设置restore_free_channel
或环境变量CONDA_RESTORE_FREE_CHANNEL
),但是一种简单的 adhoc 解决方案是将其作为一个整体添加的频道:
conda install -c free ...
对于 linux-64 平台上的boost=1.57
,我看到
conda search -c free boost=1.57[subdir='linux-64']
Loading channels: done
# Name Version Build Channel
boost 1.57.0 0 free
boost 1.57.0 1 free
boost 1.57.0 4 free