Attempt to call an undefined function glutInit
<p>I need a glut window in python.
I have the following exception using Python 3.5 and PyOpenGL.GLUT</p>

<pre><code>Traceback (most recent call last):
  File "D:\...\Test.py", line 47, in &lt;module&gt;

    if __name__ == '__main__': main()
  File "D:\...\Test.py", line 9, in main
    glutInit(sys.argv)
  File "C:\...\OpenGL\GLUT\special.py", line 333, in glutInit
    _base_glutInit( ctypes.byref(count), holder )
  File "C:\...\OpenGL\platform\baseplatform.py", line 407, in __call__
    self.__name__, self.__name__,

OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit,
check for bool(glutInit) before calling
</code></pre>

<p>Platform: <strong>Windows</strong></p>

<p>Why do i get this error?</p>

<p>Here is my code:</p>

<pre><code>from OpenGL.GLUT import *
import sys

glutInit(sys.argv)
</code></pre>

<p><strong>Problems:</strong></p>

<ul>
<li>There was no problem with <code>pip install</code> or <code>easy_install</code></li>
<li>The <code>glut.dll</code> and <code>glut32.dll</code> were missing. (They are not part of the PyPI package) you have to install them separately or <a href="ftp://ftp.sgi.com/opengl/glut/glut3.html.old#windows" rel="nofollow">download</a> it like I did.</li>
</ul>

<p>Unzipped the <code>dll</code> files from the <code>glutdlls.zip</code> and placed them next to my python file.</p>

<p><strong>Note:</strong> You can add the <code>dll</code> files to your <code>PATH</code> variable. Not necessary to keep them next to the <code>py</code> file.</p>

python python-3.x glut pyopengl