Anaconda找包,安装包时,遇到PackageNotFoundError: ”Package missing in current channels”

  • Post author:
  • Post category:其他


Anaconda作为一个工具包集成管理工具,下载python工具包是很方便的,直接敲:

conda install package_name

但是有时候安装一个工具包(如wordcloud)的时候,在当前的channels中找不到这个包,会提示:

PackageNotFoundError: Packages missing in current channels:
  - wordcloud
We have searched for the packages in the following channels:

  - https://repo.continuum.io/pkgs/main/linux-64
  - https://repo.continuum.io/pkgs/main/noarch
  - https://repo.continuum.io/pkgs/free/linux-64
  - https://repo.continuum.io/pkgs/free/noarch
  - https://repo.continuum.io/pkgs/r/linux-64
  - https://repo.continuum.io/pkgs/r/noarch
  - https://repo.continuum.io/pkgs/pro/linux-64
  - https://repo.continuum.io/pkgs/pro/noarch

这个时候,我们可以使用下面的指令来查找我们想要安装的包(以wordcloud为例)

$ anaconda search -t conda wordcloud

(python36) C:\Users\zbb>anaconda search -t conda wordcloud
Using Anaconda API: https://api.anaconda.org
Packages:
     Name                      |  Version | Package Types   | Platforms       | Builds
     ------------------------- |   ------ | --------------- | --------------- | ----------
     bushmanlab/r-pubmedwordcloud |    0.3.3 | conda           | linux-64        | r3.3.2_0
     bushmanlab/r-wordcloud    |      2.5 | conda           | linux-64        | r3.3.2_0
     conda-forge/r-wordcloud   |      2.5 | conda           | linux-64, win-64, osx-64 | r3.3.2_0, r3.4.1_0
                                          : Pretty word clouds.
     conda-forge/wordcloud     |    1.4.1 | conda           | linux-64, win-32, win-64, osx-64 | py36_0, py34_0, py35_0, py27_0
                                          : A little word cloud generator in Python
     esgirones/r-wordcloud     |      2.5 | conda           | linux-64        | r3h064c28a_0
                                          : Pretty word clouds.
     pjones/r-wordcloud        |      2.5 | conda           | linux-64        | r3.3.1_0
     sibirbil/wordcloud        |    1.1.3 | conda           | osx-64          | py27_0
                                          : A little word cloud generator
     t3kcit/wordcloud          |    1.2.1 | conda           | linux-64        | py35_0
Found 8 packages

Run 'anaconda show <USER/PACKAGE>' to get installation details

接着,我们使用show指令来查看该包的详细情况

$ anaconda show conda-forge/wordcloud

(python36) C:\Users\zbb>anaconda show  conda-forge/wordcloud
Using Anaconda API: https://api.anaconda.org
Name:    wordcloud
Summary: A little word cloud generator in Python
Access:  public
Package Types:  conda
Versions:
   + 1.2.1
   + 1.3.3
   + 1.4
   + 1.4.1

To install this package with conda run:
     conda install --channel https://conda.anaconda.org/conda-forge wordcloud

根据提示,我们使用下面的指令install这个包

$ conda install –channel

https://conda.anaconda.org/conda-forge

wordcloud

选择y(yes),然后等待下载安装.


备注:


使用Anaconda 安装指定版本的包也可以使用这种办法。



版权声明:本文为Erice_s原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。