Installing pygame module in anaconda mac(在 anaconda mac 中安装 pygame 模块)
问题描述
我的 Mac 上安装了 Anaconda.它弄乱了我的 pygame 模块.
I have Anaconda installed on my mac. And it has messed with my pygame module.
我尝试遵循此 教程 并替换 pip3 install pygame 和 conda install pygame.我试过 conda install pip 然后 pip install pygame 但我得到以下错误:
I tried following this tutorial and replacing pip3 install pygame with conda install pygame. I have tried conda install pip and then pip install pygame yet i get the following error:
Collecting pygame
Could not find any downloads that satisfy the requirement pygame
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pygame to allow).
No distributions at all found for pygame
(我从这个线程得到的想法)
(ideas i got from this thread)
在我执行conda install pip"之前使用pip install pygame"就可以了,但是我的默认 python 现在是 anaconda 并且不再访问 pygame.使用 which pip 给出 /Users/jensdonlin/anaconda/bin/pip
Using the "pip install pygame" worked before i did the "conda install pip" however my default python is now the anaconda one and no longer accesses pygame. Using which pip gives /Users/jensdonlin/anaconda/bin/pip
有没有人有一些建议可以让 anaconda 的 python3 版本访问 pygame?
Does anyone have some suggestions that would allow anaconda's version of python3 to access pygame?
也许答案涉及 use --allow-external pygame to allow 但我不确定如何使用它.
Perhaps the answer involves use --allow-external pygame to allow but im not really sure how to use that.
推荐答案
这里的问题是pygame开发者没有上传pygame到PyPI.因此,要安装它,您必须下载它并 pip install 下载的源代码,如您链接的教程中所述.您可以在 Anaconda Python 中执行此操作.请注意,在 Anaconda Python 中,即使是 Python 3,pip 也只是称为 pip,而不是 pip3.
The problem here is that the pygame developers have not uploaded pygame to PyPI. So to install it, you will have to download it and pip install the downloaded source, as described in the tutorial you linked. You can do this within the Anaconda Python. Note that in the Anaconda Python, even if it is Python 3, pip is just called pip, not pip3.
这篇关于在 anaconda mac 中安装 pygame 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 anaconda mac 中安装 pygame 模块
基础教程推荐
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 求两个直方图的卷积 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 包装空间模型 2022-01-01
