Python bindings for Oculus Rift virtual reality SDK
Clone or download
Latest commit fd35bed Jul 5, 2017


Python bindings for Oculus Rift SDK

Screenshot of pygame/


If the above command fails, you might need to install pip

Alternatively, you can get the pyovr installer at github:


import sys
import time
import ovr

session, luid = ovr.create()
hmdDesc = ovr.getHmdDesc(session)
print hmdDesc.ProductName
for t in range(100):
    # Query the HMD for the current tracking state.
    ts  = ovr.getTrackingState(session, ovr.getTimeInSeconds(), True)
    if ts.StatusFlags & (ovr.Status_OrientationTracked | ovr.Status_PositionTracked):
        pose = ts.HeadPose
        print pose.ThePose

Look in the "examples" folder for more example code.

See the Oculus developer documentation for more details about the OVR C API.

For more information about how this Python API compares to the official C API, see our wiki at


Runs on Windows only at the moment, but so does OVR SDK 1.16.0

This python module uses the installed 32-bit OVR dll on Windows, so you must have the Oculus 1.16.0 Runtime installed to use this module. Get the Oculus Runtime at

This module also assumes you are running a 32-bit version of python. In particular, it was developed and tested with 32-bit Python version 2.7 installed from

Other python bindings for libOVR: