使用Anaconda下载工具包

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

conda install package_name

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

[root@master sbin]$ conda install xmltodict
Fetching package metadata .......
Solving package specifications: .
PackageNotFoundError: Package not found: '' Package missing in current linux-64 channels: 
  - xmltodict

You can search for packages on anaconda.org with

    anaconda search -t conda xmltodict

然后你按照提示在anaconda.org中找工具包,

[root@master sbin]$ anaconda search -t conda xmltodict
Using Anaconda API: https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
Packages:
     Name                      |  Version | Package Types   | Platforms      
     ------------------------- |   ------ | --------------- | ---------------
     PinguCarsti/xmltodict     |    0.8.3 | conda           | linux-64, osx-64
     abgreenwell/xmltodict     |    0.8.3 | conda           | win-64         
     asmeurer/xmltodict        |    0.8.3 | conda           | osx-64         
                                          : https://github.com/martinblech/xmltodict
     auto/xmltodict            |    0.8.6 | conda           | linux-64, linux-32, osx-64
                                          : https://github.com/martinblech/xmltodict
     bioconda/xmltodict        |    0.9.2 | conda           | linux-64, osx-64
                                          : Makes working with XML feel like you are working with JSON
     conda-forge/xmltodict     |   0.10.2 | conda           | linux-64, win-32, win-64, osx-64
     dan_blanchard/xmltodict   |    0.8.3 | conda           | linux-64       
                                          : https://github.com/martinblech/xmltodict
     davidbgonzalez/xmltodict  |    0.9.2 | conda           | linux-64, osx-64
                                          : Makes working with XML feel like you are working with JSON
     derickl/xmltodict         |   0.10.2 | conda           | osx-64         
     dimazest/xmltodict        |    0.9.2 | conda           | linux-64, osx-64
     equipoise/xmltodict       |    0.9.2 | conda           | win-64, osx-64 
     hargup/xmltodict          |          | conda           | None-None, linux-64
                                          : Makes working with XML feel like you are working with JSON
     indico/xmltodict          |    0.9.2 | conda           | linux-64       
                                          : Makes working with XML feel like you are working with JSON
     jacksongs/xmltodict       |   0.10.2 | conda           | osx-64         
     kabaka0/xmltodict         |    0.9.2 | conda           | linux-64       
                                          : Makes working with XML feel like you are working with JSON
     luzazul45/xmltodict       |    0.9.2 | conda           | win-64         
                                          : Makes working with XML feel like you are working with JSON
     mathieu/xmltodict         |   0.10.1 | conda           | osx-64         
                                          : Makes working with XML feel like you are working with JSON
     mh00h/xmltodict           |    0.9.2 | conda           | linux-64       
                                          : Makes working with XML feel like you are working with JSON
     moustik/xmltodict         |    0.9.2 | conda           | linux-64       
     russellthomas/xmltodict   |    0.9.0 | conda           | osx-64         
                                          : xmltodict is a simple library that aims at making XML feel like working with JSON
     xavier/xmltodict          |    0.5.1 | conda           | linux-64       
                                          : https://github.com/martinblech/xmltodict
Found 21 packages

我们发现了21个包,现在就选择一个合适的版本进行安装,如我选择这个:

 conda-forge/xmltodict     |   0.10.2 | conda           | linux-64, win-32, win-64, osx-64

那么执行下面命令进行安装即可:

[root@master ~]$ conda install -c https://conda.anaconda.org/conda-forge xmltodict
或者
conda install -c conda-forge xmltodict
  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
anaconda是一个流行的Python发行版,它包含了许多常用的Python包和工具。要下载并安装anaconda,您可以按照以下步骤进行操作: 1. 首先,访问 https://www.anaconda.com/products/individual 下载anaconda的最新版本。 2. 根据您的操作系统选择相应的安装程序,并下载安装包。 3. 打开下载的安装包,并按照安装向导的指示进行安装。在安装过程中,您可以选择是否将anaconda添加到系统环境变量中。 4. 安装完成后,您可以通过打开命令行或终端窗口,输入以下命令来验证anaconda是否成功安装: ``` conda --version ``` 如果您看到了conda的版本信息,则说明anaconda已成功安装。 5. 要下载并安装anaconda的全部包,可以使用conda命令来创建一个全新的环境,并安装所有默认包。请在命令行或终端窗口中输入以下命令: ``` conda create --name myenv anaconda ``` 这将创建一个名为"myenv"的新环境,并安装anaconda中的所有默认包。您可以根据需要自定义环境名称。 ``` conda create --name myenv python=3.8 anaconda ``` 这将创建一个名为"myenv"的新环境,并安装anaconda中的所有默认包以及Python版本为3.8。 6. 安装过程可能需要一些时间,请耐心等待。安装完成后,您可以通过激活环境来开始使用它。在命令行或终端窗口中输入以下命令: ``` conda activate myenv ``` 现在,您可以使用anaconda提供的所有包和工具了。 希望这个回答能帮到您!如果您还有其他

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值