我很奇怪地无法在python中安装pygame在conda环境中进行游戏开发
我正在学习Python,并且已经切换到Anaconda,因为它提供了比普通版本更多的支持和预安装的库。就在我开始从pygame开始时,我在Anaconda提示中的错误尝试安装:
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://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.
请帮助我访问Pygame,因为我的朋友在使用它时没有问题,我尝试重新安装,但即使那也不是't帮助
I'm learning Python and have switched to Anaconda for it provides much more support and pre-installed libraries than the normal version. Just as I begin to start with pygame, I've this error in Anaconda Prompt trying to install it:
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://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.
Please help me to access pygame as my friends have no problem in working with it, and I tried re-installing, but even that doesn't helps.????
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您遵循错误消息中的建议,然后到达anaconda.org并输入
pygame
,则发现默认频道无法从中获得。如果要使用conda
进行安装,唯一的选择是使用可用的通道之一,例如cogsci
。因此,为了为您的游戏开发创建环境,您可以这样做:或者,如果要安装到现有环境(请注意,为单独的项目具有单独的环境是建议的),那么您可以使用
Note安装PyGame,尽管该频道中的版本超过5年。另一种选择是您可以使用PIP安装Pygame:#
If you follow the suggestion in the error message and got to anaconda.org and enter
pygame
, then you find that it is not available from the default channel. The only option, if you want to install usingconda
, would be to use one of the channels from which it is available, e.g.CogSci
. So to create an environment for your game development, you could for example do:or, if you want to install to an existing environment (note that having a seperate environment for seperate projects is advisbale), then you can install pygame with
Note though that the version in that channel is over 5 years old. An alternative is that you could install pygame using pip:#