Python 无法导入PyOpenGL

Python 无法导入PyOpenGL,python,python-2.7,python-import,pyopengl,Python,Python 2.7,Python Import,Pyopengl,我正在尝试在mac上安装PyOpenGL模块。但是当我运行pip install PyOpenGL PyOpenGL\u accelerate时,我得到: Requirement already satisfied (use --upgrade to upgrade): PyOpenGL in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.1.0a3-py

我正在尝试在mac上安装PyOpenGL模块。但是当我运行
pip install PyOpenGL PyOpenGL\u accelerate
时,我得到:

    Requirement already satisfied (use --upgrade to upgrade):
 PyOpenGL in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.1.0a3-py2.7.egg
    Requirement already satisfied (use --upgrade to upgrade): 
PyOpenGL-accelerate in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL_accelerate-3.1.0a3-py2.7-macosx-10.6-intel.egg
    Cleaning up...
因为没有错误,而且我很天真,我会假设模块已经安装。但是当我尝试导入任何应该随附的东西时,比如

import OpenGL 
OpenGL.ERROR_ON_COPY = True 
from OpenGL.GL import *
from OpenGL.GLUT import *
找不到它。 当我尝试运行它时,我得到:

/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/lego90511/Desktop/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/GLUT/gears.py
Traceback (most recent call last):
  File "/Users/lego90511/Desktop/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/GLUT/gears.py", line 7, in <module>
    import OpenGL 
ImportError: No module named OpenGL

那么.egg文件是什么呢?

您是使用与安装它相同的Python进行导入的吗?您正在运行的代码是什么?您收到的错误消息是什么?我使用的代码来自一个PyOpenGL示例,我添加了上面的一些导入,它们都不起作用。解释器是/System/Library/Frameworks/Python.framework/Versions/2.7/bin/Python。可能是我使用了错误的Python,但我也使用了pip-2.7进行了尝试,并得到了相同的结果。我仍然希望进行回溯。我的意思不是听起来很模糊,但是,回溯什么?完整的错误消息。所有这些。
pip unzip /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.1.0a3-py2.7.egg
The module /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.1.0a3-py2.7.egg (in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.1.0a3-py2.7.egg) is not a zip file; cannot be unzipped
Storing complete log in /Users/lego90511/.pip/pip.log