python-3.x - 尝试在 Anaconda 上安装 pygame 时,Python 3.x 降级为 Python 2.7

标签 python-3.x pygame conda pyopengl

我正在使用 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/

相关文章:

python - 如何通过改变进度条的颜色来显示护盾等级

python - 我将如何使用 Pygame 绘制墙壁?

python-3.x - 有一个anaconda navigator already running错误的实例

python - 使用 Miniforge 安装 Anaconda Navigator(带有 M1 芯片的 Mac)

python - 如何使用启用了自定义 Fips 的 Openssl 编译 Python 3.6?

python-3.x - 如何从 try_all_threshold 中自动选择最佳结果?

python - pygame中不播放背景音乐

python - Windows 上的 Conda Python 环境缺少 DLL 文件

python-3.x - 导入错误 : No module named 'numpy' in Windows

python - 为什么 print 2++3 在 python 中打印 5?