我正在使用 Anaconda Python 3。 我正在尝试安装 pyOpenGL、Vpython 和 pygame。
使用conda install
安装pyOpenGL和Vpython就可以了。
当我尝试安装 Pygame 时,使用 conda install
显示:
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
.
.
.
因此,如果我决定安装 pygame,我会将 python3 降级到 python 2.7,并且无法使用 pyOpenGL。 有没有办法在这种环境下安装pygame而不降级python?
最佳答案
这意味着您尝试安装的 channel (即 kne
)中没有可用于 Python 3.7 的 Pygame 软件包。由于最新版本适用于 Python 3.5,因此您需要为该 Python 版本创建 conda 环境并在其上安装 Pygame。
关于python-3.x - 尝试在 Anaconda 上安装 pygame 时,Python 3.x 降级为 Python 2.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55839655/