python安装pygame的一些坑,尝试在Anaconda上安装pygame时将Python 3.x降级为Python 2.7

I'm working with Anaconda Python 3.

I'm trying to install pyOpenGL, Vpython and pygame.

Installing pyOpenGL and Vpython is fine using conda install.

When I try to install Pygame, using conda install it shows:

conda install -c https://conda.binstar.org/kne pygame

#same for conda install pygame

...

The following NEW packages will be INSTALLED:

.

.

.

The following packages will be REMOVED:

backports.os-0.1.1-py37_0

importlib_metadata-0.8-py37_0

jeepney-0.4-py37_0

jupyterlab_server-0.2.0-py37_0

secretstorage-3.1.1-py37_0

wurlitzer-1.0.2-py37_0

The following packages will be UPDATED:

.

.

.

The following packages will be DOWNGRADED:

.

.

.

python 3.7.3-h0371630_0 --> 2.7.16-h9bab390_0

.

.

.

So if I decide to install pygame, I downgrade python3 to python 2.7 and I'm unable to use pyOpenGL.

Is there a way to install pygame in this environment without downgrading python?

解决方案

This means that there are not Pygame packages available for Python 3.7 from the channel you're trying to install it (i.e. kne). Since the last version available is for Python 3.5, you need to create a conda environment for that Python version and install Pygame on it.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值