在Anaconda Mac中安装pygame模块 [英] Installing pygame module in anaconda mac

查看:240
本文介绍了在Anaconda Mac中安装pygame模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Mac上已安装 Anaconda .并把我的pygame模块弄乱了.

I have Anaconda installed on my mac. And it has messed with my pygame module.

我尝试了以下教程,并替换了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安装下载的源代码.您可以在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模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆