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 7828249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:16:20+00:00 2026-06-02T10:16:20+00:00

I am trying to learn the basics of game programming and I have installed

  • 0

I am trying to learn the basics of game programming and I have installed pygame and pyopengl for that.

MyCode:

import sys
import OpenGL

from OpenGL.GL import *     
from OpenGL.GLU import *    
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()

draw()

When I run the above code in my command prompt using

python test.py

I get the following error.

Traceback (most recent call last):
  File "test.py", line 13, in <module>
    glutInit(sys.argv)
  File "C:\Python27\lib\site-packages\pyopengl-3.0.2a5-py2.7.egg\OpenGL\GLUT\special.py", line 324, in glutInit
    _base_glutInit( ctypes.byref(count), holder )
TypeError: 'NoneType' object is not callable

I don’t understand why I am getting this error. Am I calling glutinit in a wrong way?

I am using Python 2.7.2.

  • 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-06-02T10:16:21+00:00Added an answer on June 2, 2026 at 10:16 am

    The problem was with my PyOpenGL installation. Earlier I installed it using easy_install.

    So, as @Ferdinand suggested that there seems to be something wrong with your pyopengl installation.

    I did a clean install using python setup.py install and it worked.

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

Sidebar

Related Questions

During the last 2 months I've been trying to learn the basics of game
I'm trying to learn the basics of iOS programming and I was wondering how
I am trying to learn to make a basic game using pygame. I want
I am trying to learn the basics of C, C++ programming, so I've started
I am trying to learn the basics of THREE.js. I have read a couple
I'm new to Java-based web programming and am trying to learn JSF from the
I am trying to learn the basics of socket programming and am using some
Greetings, everyone. I'm trying to learn some Silverlight basics, and have decided to write
I'm trying to learn jquery, I've some basics of javascript. I've written this piece
I'm trying to learn this basic thing about processors that should be taught in

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.