conda安装包

Posted 唐僧洗发爱飘柔

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了conda安装包相关的知识,希望对你有一定的参考价值。

  我们一般安装第三方包(pulp)会通过cmd命令: conda install pulp

  但是今天安装pulp包的时候出现下面的问题:

C:\Users\81584>conda install pulp
Fetching package metadata .............

PackageNotFoundError: Packages missing in current channels:

  - pulp

We have searched for the packages in the following channels:

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

 

  一开始我没找到解决方法,上网查阅之后可以按照以下方法进行:

  (1)、执行  anaconda search -t conda pulp

   出现如下东西:

C:\Users\81584>anaconda search -t conda pulp
Using Anaconda API: https://api.anaconda.org
Run ‘anaconda show <USER/PACKAGE>‘ to get more details:
Packages:
     Name                      |  Version | Package Types   | Platforms
     ------------------------- |   ------ | --------------- | ---------------
     FlyEM/pulp                |    1.6.5 | conda           | linux-64, osx-64
                                          : PuLP is an LP modeler written in python. PuLP can generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems.
     Primer/pulp               |    1.6.1 | conda           | win-64
                                          : \nPuLP is an LP modeler written in python. PuLP can generate MPS or LP files\nand call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear\nproblems.\n
     agerlach/pulp             |    1.6.0 | conda           | linux-64, win-32, osx-64, linux-32, win-64
                                          : \nPuLP is an LP modeler written in python. PuLP can generate MPS or LP files\nand call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear\nproblems.\n
     auto/pulp-or              |    1.4.6 | conda           | linux-64
                                          : http://pulp-or.googlecode.com/
     auto/pulpitum             |    0.2.2 | conda           | linux-64
                                          : https://github.com/requirements/pulpitum
     christopherschroeder/pulp |    1.6.0 | conda           | linux-64
                                          : PuLP is an LP modeler written in python. PuLP can generate MPS or LP files\nand call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear\nproblems.
     conda-forge/pulp          |    1.6.8 | conda           | linux-64, win-32, win-64, osx-64
                                          : PuLP is an LP modeler written in python. PuLP can generate MPS or LP files
and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems.

     desktable/pulp            |    1.5.9 | conda           | linux-64
                                          : \nPuLP is an LP modeler written in python. PuLP can generate MPS or LP files\nand call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear\nproblems.\n
     flyem-forge/pulp          |    1.6.5 | conda           | linux-64
                                          : PuLP is an LP modeler written in python. PuLP can generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems.
     huangg/pulp               |    1.6.5 | conda           | linux-64, osx-64
                                          : PuLP is an LP modeler written in python. PuLP can generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems.
     mjliu/pulp                |  1.6.1.1 | conda           | linux-64
                                          : PuLP is an LP modeler written in python. PuLP can generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems. This version requires pyparsing >= 2.0.1.
     picklesRnice/pulp         |    1.5.6 | conda           | osx-64
                                          : PuLP is an LP modeler written in python. PuLP can generate MPS or LP files\nand call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear\nproblems.
     pidefrem/pulp             |    1.6.1 | conda           | osx-64
                                          : \nPuLP is an LP modeler written in python. PuLP can generate MPS or LP files\nand call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear\nproblems.\n
     psteinberg/pulp           |          | conda           | linux-64
     travis/coinor.pulp        |    1.0.4 | conda           | linux-64
                                          : http://www.coin-or.org/PuLP/
     yodle_data_science/pulp   |    1.6.1 | conda           | linux-64
Found 16 packages

  (2)、执行  anaconda show <USER/PACKAGE>

  如我选择 anaconda show conda-forge/pulp 会出现:

C:\Users\81584>anaconda show conda-forge/pulp
Using Anaconda API: https://api.anaconda.org
Name:    pulp
Summary: PuLP is an LP modeler written in python. PuLP can generate MPS or LP files
and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems.

Access:  public
Package Types:  conda
Versions:
   + 1.6.8

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

  (3)、执行 conda install --channel https://conda.anaconda.org/conda-forge pulp

   这一步是按照上一步给出的显示执行的。

  剩下的步骤就按照他的提示来就行了

以上是关于conda安装包的主要内容,如果未能解决你的问题,请参考以下文章

conda安装包

conda,pip 安装指定版本的指定包

conda安装包

conda包手动下载 本地安装

使用 conda 构建和安装本地或自定义 R 包

使用 pip 或 conda 管理包? [复制]