I am trying to learn 3d by following thenewboston on you tube. I got the
import OpenGL
to work, but then when he types in
from OpenGL.GLU import *
it does not work. I noticed that I had a folder named OpenGL inside the OpenGL folder. So I changed the one inside to GL. I typed in
from OpenGL.GL.GLU import *
and it still did not work. It is giving me this error.
File "C:\Python34\OpenGL\GL\__init__.py", line 174, in <module>
from OpenGL.version import __version__
ImportError: No module named 'OpenGL.version'
I looked this up and on another thread here on stackoverflow, it said to use setup tools and enter the command directory of easyinstall. I have pip and setup tools installed along with opengl of course. I entered in my directery into cmd as
C:\Python34\setuptools\easy_install pyopengl
It then gave me this error.
Traceback (most recent call last):
File "C:\Python34\setuptools\eas
from setuptools.command.easy_i
File "C:\Python34\setuptools\set
from six.moves import filter,
ImportError: No module named 'six'
Here is my code at the start.
import pygame
from pygame.locals import *
import OpenGL
from OpenGL.GL.GLU import *
import pip
import setuptools
If anyone knows what I can do that would be very helpful. Thank you for your time and effort in solving this problem.
Edit 1:
I tried using pip and I got this error.
Command "C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:
ers\\user\\AppData\\Local\\Temp\\pip-build-1nitmoob\\PyOpenGL-accelerate\\se
py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\
, '\n'), __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Te
ip-_p9qo3yf-record\install-record.txt --single-version-externally-managed --
ile" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-build-
moob\PyOpenGL-accelerate
The video I am using is https://www.youtube.com/watch?v=Snl7UwuMoD4&list=PL6gx4Cwl9DGAjkwJocj7vlc_mFU-4wXJq&index=91
py -3.4 -m pip install PyOpenGL PyOpenGL_accelerate. This will install pyopengl explicitly for Python 3.4 and runs pip as a module (to avoid PATH variable problems for Windows users). Also please add a link to the video. - skrximport OpenGLworks it should actually be installed, but maybe it was installed incorrectly. The "OpenGL" directory should be inside of theC:\Python34\Lib\site-packagesdirectory and it looks like you have it in your Python34 directory. You could try to uninstall or delete all pyopengl related stuff in your Python folder and install it one more time or try a fresh Python (3.6) installation (you could also use a virtualenv if you know how that works). I've just installed only PyOpenGL via pip for Python 3.6 andfrom OpenGL.GLU import *works. - skrximport pygame as pg. - skrx