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 模块
基础教程推荐
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
