When trying to install pygame on Anaconda Python 3.x is downgraded to Python 2.7

房东的猫 提交于 2019-12-24 07:24:02

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/55839655/when-trying-to-install-pygame-on-anaconda-python-3-x-is-downgraded-to-python-2-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!