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

查看:271
本文介绍了需要安装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二进制文件

下载32位或64位程序包以获取 PyOpenGL提供与OpenGL的绑定, GLUT和GLE
(例如
PyOpenGL-3.1.5-cp38-cp38-win_amd64.whl
PyOpenGL_accelerate-3.1.5-cp38-cp38-win_amd64.whl )

Download a 32 bit or 64 bit package for PyOpenGL provides bindings to OpenGL, GLUT, and GLE
(e.g.
PyOpenGL-3.1.5-cp38-cp38-win_amd64.whl and
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天全站免登陆