Python 2.7 用于Python 2.7的Ubuntu上的PyOpenGL

Python 2.7 用于Python 2.7的Ubuntu上的PyOpenGL,python-2.7,opengl,ubuntu,pyopengl,openglcontext,Python 2.7,Opengl,Ubuntu,Pyopengl,Openglcontext,我正在尝试安装PyOpenGL,到目前为止,我已经尝试了以下方法: $pip安装PyOpenGL PyOpenGL\u加速 $sudo python2.7-m pip安装PyOpenGL PyOpenGL\u加速 以上的一些变化 从源代码处安装 很遗憾,我仍然无法运行以下导入: from OpenGL.GL import * from OpenGL.GLUT import * from OpenGL.GLU import * 我收到错误消息: 无法检测未定义的名称 我错过什么了吗? 我需要

我正在尝试安装PyOpenGL,到目前为止,我已经尝试了以下方法:

  • $pip安装PyOpenGL PyOpenGL\u加速
  • $sudo python2.7-m pip安装PyOpenGL PyOpenGL\u加速
  • 以上的一些变化
  • 从源代码处安装 很遗憾,我仍然无法运行以下导入:

    from OpenGL.GL import *  
    from OpenGL.GLUT import *
    from OpenGL.GLU import *
    
    我收到错误消息:

    无法检测未定义的名称

    我错过什么了吗? 我需要安装更多的软件包吗

    我需要单独获取OpenGLContext吗? 如果是,如何安装,因为

    pip install PyDispatcher PyVRML97 OpenGLContext
    
    也不行


    任何帮助都将不胜感激

    请尝试sudo apt get install python opengl

    您的程序运行情况如何。我们决定用一个webGL引擎来实现这个项目。但上述方法实际上应该有效。我的电脑似乎有了opengl就很奇怪了。