python安装pygame模块,在Anaconda Mac中安装pygame模块

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

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)

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

Does anyone have some suggestions that would allow anaconda's version of python3 to access pygame?

Perhaps the answer involves use --allow-external pygame to allow but im not really sure how to use that.

解决方案

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值