Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6374173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:27:18+00:00 2026-05-25T01:27:18+00:00

What I’m trying to do is code a basic OpenGL 2.0 window, when I

  • 0

What I’m trying to do is code a basic OpenGL 2.0 window, when I run the code from a file, it works for the first couple of runs, then it dumps errors. If I run the same exact code from the IDLE GUI, I get a window every time. The following is first a list of added Python 2.6.6 packages, the code and the errors. Am I using any conflicting packages? Am I missing a package? My imports work in the IDLE GUI. Any help would be great!!

Date:   Aug 1, 2011             Time:   03:20:00 AM
This is the listing of packages installed for Python 2.6.6.  
This file was created manually and is meant to be used as a 
reference to show what packages were added in which order

python-2.6.6.msi
setuptools-0.6c11-win32-py26.exe
numpy-1.6.0-win32-superpack-python26.exe
PIL-1.1.7-win32-py26.exe
wxPython2.8-win32-unicode-2.8.12.0-py26.exe
wxPython2.8-win32-docs-demos-2.8.12.0.exe
pyglet-1.1.4.msi
pywin32-216-win32.py32.exe
PyOpenGL-3.0.1.win32.exe
PyOpenGL-accelerate-3.0.1-win32-py26.exe
Pygame-1.9.1-win32-py26.msi
py2exe-0.6.9-win32-py2.6.exe
psyco (using c:\python26\scripts\easy_install psyco)
    #import sys              #redundant(used to  eval errors)
    #import OpenGL           #redundant(used to  eval errors)       
    #import numpy            #redundant(used to  eval errors)

    #From here down is the original code, with gl imports listed as GLUT/GL/GLU
    #Page 26 PyOpenGL.pdf by Stan Blank, Ph.D
    from OpenGL.GL import *     #These 3 imports are called in a layered format
    from OpenGL.GLU import *    #Fron the simplest to the most complex(complete)
    from OpenGL.GLUT import *

    def draw():
        glClear(GL_COLOR_BUFFER_BIT)
        glutWireTeapot(0.5)
        glFlush()

    glutInit(sys.argv)
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)
    glutInitWindowSize(250, 250)
    glutInitWindowPosition(100, 100)
    glutCreateWindow("Python OGL Program")
    glutDisplayFunc(draw)
    glutMainLoop()
IDLE error listings
Traceback (most recent call last):
  File "C:\Code\Python\PyOpenGL\ogl_01.py", line 7, in 
    from OpenGL.GL import *
  File "C:\Python26\lib\site-packages\pyopengl-3.0.1-py2.6-win32.egg\OpenGL\GL\__init__.py", line 2, in 
    from OpenGL.raw.GL import *
  File "C:\Python26\lib\site-packages\pyopengl-3.0.1-py2.6-win32.egg\OpenGL\raw\GL\__init__.py", line 6, in 
    from OpenGL.raw.GL.constants import *
  File "C:\Python26\lib\site-packages\pyopengl-3.0.1-py2.6-win32.egg\OpenGL\raw\GL\constants.py", line 7, in 
    from OpenGL import platform, arrays
  File "C:\Python26\lib\site-packages\pyopengl-3.0.1-py2.6-win32.egg\OpenGL\arrays\__init__.py", line 22, in 
    formathandler.FormatHandler.loadAll()
  File "C:\Python26\lib\site-packages\pyopengl-3.0.1-py2.6-win32.egg\OpenGL\arrays\formathandler.py", line 37, in loadAll
    cls.loadPlugin( entrypoint )
  File "C:\Python26\lib\site-packages\pyopengl-3.0.1-py2.6-win32.egg\OpenGL\arrays\formathandler.py", line 44, in loadPlugin
    plugin_class = entrypoint.load()
  File "C:\Python26\lib\site-packages\pyopengl-3.0.1-py2.6-win32.egg\OpenGL\plugins.py", line 14, in load
    return importByName( self.import_path )
  File "C:\Python26\lib\site-packages\pyopengl-3.0.1-py2.6-win32.egg\OpenGL\plugins.py", line 28, in importByName
    module = __import__( ".".join(moduleName), {}, {}, moduleName)
  File "C:\Python26\lib\site-packages\pyopengl-3.0.1-py2.6-win32.egg\OpenGL\arrays\numpymodule.py", line 25, in 
    from OpenGL_accelerate.numpy_formathandler import NumpyHandler
  File "numpy.pxd", line 30, in OpenGL_accelerate.numpy_formathandler (src\numpy_formathandler.c:3543)
ValueError: numpy.dtype does not appear to be the correct type object

Sorry for the length of the post, I just wanted to fully document the problem. The Py install is running on Win XP SP3, IDLE header:

Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:27:18+00:00Added an answer on May 25, 2026 at 1:27 am

    I tried this and it worked in my case,

    1. went to http://pypi.python.org/pypi/PyOpenGL-accelerate and downloaded the zip source package.
    2. using 7zip I extracted the package to a folder named PyOpenGL-accelerate-3.0.1
    3. then using a command prompt, navigated to the folder I just created
    4. I typed C:\python26\python setup.py install to execute the package install

      Once this completed, I ran a basic OpenGL script in IDLE, Dr.Python, and PythonWin. All three IDEs were able to create the correct OpenGL window (a 400×400 window, black background, and a white wire-frame teapot.) without any errors. With this solution I was able to keep Numpy 1.6.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.