2

I've recently decided to learn OpenGl in python.

I installed PyOpenGL using pip3 install PyOpenGl PyOpenGl_accelerate. I was then about to follow a tutorial for PyOpenGL. The first item was to install PyOpenGLContext.

I tried to install PyOpenGLContext with both pip3 install OpenGLContext and pip3 install PyDispatcher PyVRML97 OpenGLContext and both gave me the same error:

    Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/3r/xfny397j6j98y1sjgh_s574m0000gn/T/pip-build-o7zx54vx/OpenGLContext/setup.py", line 10
    except ImportError, err:
                      ^
SyntaxError: invalid syntax

So, there's a syntax error there. How do I get around this? If you need more information, please let me know. I am trying to install this on a MacBook Pro (2013) version for Python3.5.

2 Answers 2

4

It should work if you download and install the wheel from Unofficial Windows Binaries for Python Extension Packages:

  1. Download the OpenGLContext‑2.3.0‑py2.py3‑none‑any.whl installation file to a an arbitrary directory.
  2. cd to that directory in a command line and install using pip install OpenGLContext‑2.3.0‑py2.py3‑none‑any.whl
Sign up to request clarification or add additional context in comments.

Comments

2

It looks like OpenGLContext has not been updated in a while, and thus is not compatible with Python 3.5.

Having a look at https://pypi.python.org/pypi/OpenGLContext yields that the last update was in 2014.

You probably want to either use an older python version, or a different library.

4 Comments

I've done some basic graphics for FLTK (I didn't like that library) in C++ and I'd like to learn some graphics in Python. Do you have any other recommendations?
I'll go ahead and guess your answer is Tcl/Tk. I'll start there.
@K.Shores if you like python, really have a look at Panda3D (Don't get scared by the website). Its a full game engine though, so not sure if thats already too high-level.
That's not. I'm in my sophomore year of college. I won't be focusing on graphics in my course work, but I still want to get familiar with graphics.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.