conda:为什么我不能在一个环境中安装pkgs,而可以在另一个环境中安装?

时间:2019-07-06 00:30:44

标签: anaconda

我正在使用conda的两个环境。我不能在一个环境中安装软件包,而可以在另一个环境中安装软件包。 错误消息是:“解决环境:失败”

系统:Windows 10 x64

错误消息:

(py3env) C:\>conda install cython
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - anaconda/pkgs/free/win-64::protobuf==3.2.0=py36_0 -> libprotobuf==3.2.0
  - anaconda/pkgs/free/win-64::tensorflow==1.2.1=py36_0 -> backports.weakref==1.0rc1
  - anaconda/pkgs/free/win-64::tensorflow==1.2.1=py36_0 -> bleach==1.5.0
  - anaconda/pkgs/free/win-64::tensorflow==1.2.1=py36_0 -> html5lib==0.9999999

Current channels:

  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/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.

在其他环境中的成功信息:

(py2env) C:\>conda install cython Collecting package metadata (current_repodata.json): done Solving environment: done

## Package Plan ##

  environment location: C:\Users\sonic\Anaconda3\envs\py2env

  added / updated specs:
    - cython


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2019.6.16          |           py27_0         151 KB
    cython-0.29.11             |   py27hc56fc5f_0         2.0 MB
    ------------------------------------------------------------
                                           Total:         2.1 MB

The following NEW packages will be INSTALLED:

  cython             pkgs/main/win-64::cython-0.29.11-py27hc56fc5f_0

The following packages will be UPDATED:

  certifi            anaconda/pkgs/free::certifi-2016.2.28~ --> pkgs/main::certifi-2019.6.16-py27_0


Proceed ([y]/n)?

1 个答案:

答案 0 :(得分:0)

我认为这是因为您从“免费”频道安装了软件包,但是该频道已被删除。因此,conda对于该怎么办感到困惑。您应该阅读博客文章anaconda.com/why-we-removed-the-free-channel-in-conda-4-7,并通过运行命令conda config --set restore_free_channel true将该博客中所述的“免费”频道暂时添加回您的配置中。运行该命令后,如果您完成了Cython的安装,则可以将恢复可用频道设置回false。感谢@darthbith的评论