pygame报错:PackagesNotFoundError: The following packages are not available from current channels

conda install pygame时报错,按网上办法,更新conda、anaconda,pip install,conda install -c conda-forge pygame 均行不通。

$ conda install pygame
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
  - pygame
Current channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/osx-64
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/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.
解决办法:
1 搜索包

anaconda search -t conda pygame 【conda search pygame是搜索不到的,没搜索到具体原因,欢迎知晓的人士指教】

platforms为适用的操作系统,Builds为适用的python版本
#app @ user1 in ~ [15:22:44]
$ anaconda search -t conda pygame
Using Anaconda API: https://api.anaconda.org
Packages:
     Name                      |  Version | Package Types   | Platforms       | Builds
     ------------------------- |   ------ | --------------- | --------------- | ----------
     CogSci/pygame             |  1.9.2a0 | conda           | linux-64, win-32, osx-64, win-64 | py35_0, py27_0
                                          : Python library based on SDL for making games
     Fadox45/pygame            |  1.9.2a0 | conda           | win-64          | py35_0
     Maceo57/pygame            |  1.9.2a0 | conda           | osx-64          | py35_0
     auto/pygamess             |    0.3.0 | conda           | linux-64        | py27_0
                                          : https://github.com/kzfm/pygamess

Run 'anaconda show <USER/PACKAGE>' to get installation details
2 搜索包详情

anaconda show CogSci/pygame

$ anaconda show CogSci/pygame
Using Anaconda API: https://api.anaconda.org
Name:    pygame
Summary: Python library based on SDL for making games
Access:  public
Package Types:  conda
Versions:
   + 1.9.2a0

To install this package with conda run:
     conda install --channel https://conda.anaconda.org/CogSci pygame
3 安装包
conda install --channel https://conda.anaconda.org/CogSci pygame 

注意注意:
此包适用的python版本是py35_0, py27_0,conda的优点是会自动安装所依赖的python版本。我当前版本是3.7,所以最好自己再创建一个不同python版本的虚拟环境。
创建不同版本的python环境 https://blog.csdn.net/qq_41933542/article/details/105889790
在这里插入图片描述

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值