需要安装 PyOpenGL (Windows) [英] Need to Install PyOpenGL (Windows)

查看:22
本文介绍了需要安装 PyOpenGL (Windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Windows 10 上使用 pip 安装 PyOpenGL.
我尝试使用 pip install PyOpenGL 安装它,它告诉我它已成功安装,但是当我尝试在 python 中使用 PyOpenGL 时,它告诉我我没有名为 PyOpenGL 的模块.你知道问题出在哪里吗?

I am trying to install PyOpenGL using pip on Windows 10.
I have tried to install it using pip install PyOpenGL and it tells me that it has installed it successfully but when I try to use PyOpenGL in python, it tells me that I do not have a module named PyOpenGL. Do you know what the problem is?

推荐答案

转到 非官方Python 扩展包的 Windows 二进制文件

PyOpenGL 提供对 OpenGL 的绑定,下载 32 位或 64 位软件包,GLUT 和 GLE
(例如
PyOpenGL-3.1.5-cp38-cp38-win_amd64.whl
PyOpenGL_accelerate-3.1.5-cp38-cp38-win_amd64.whl)

以管理员身份打开命令提示符 (cmd.exe).切换到下载目录并通过 pip install packagename.whl 安装包.

Open Command Prompt (cmd.exe) as administrator. Change to the download directory and install the packages by pip install packagename.whl.

例如:

pip install PyOpenGL-3.1.5-cp38-cp38-win_amd64.whl

pip install PyOpenGL_accelerate-3.1.5-cp38-cp38-win_amd64.whl

如果该包已经安装,但不工作,那么你必须忽略当前安装的包,通过选项--ignore-installed:

If the package is already installed, but doesn't work, then you have to ignore the currently installed package, by the option --ignore-installed:

pip install --ignore-installed PyOpenGL-3.1.5-cp38-cp38-win_amd64.whl

pip install --ignore-installed PyOpenGL_accelerate-3.1.5-cp38-cp38-win_amd64.whl

这篇关于需要安装 PyOpenGL (Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆