Install Python and Pip
This library (obviously) requires a Python language runtime - the OpenXC library supports python 3.x only, for python 2.x support use version 0.15.0.
Mac OS X and Linux
Mac OS X and most Linux distributions already have a compatible Python installed. Run
python --versionfrom a terminal to check - you need a 3.6.x version, such as 3.6.8.
- Download and run the Python 3.6.x MSI installer.
Make sure to select to option to
Add python.exe to Path.
- Add the Python Scripts directory your PATH:
PATH=%PATH%;C:\Users\%username%\AppData\Local\Programs\Python\Python36-32\Scripts. If you aren't sure how to edit your
PATH, see this guide for all versions of Windows. Log out and back in for the change to take effect.
- Install pip, a
Python package manager by saving the
get-pip.pyscript to a file and running it from a terminal.
- Download and run the Python 3.6.x MSI installer. Make sure to select to option to
setup.exepackage list, select the
python-setuptoolspackages. Then, inside Cygwin install
$ easy_install pip
Install the openxc Package
You can install or upgrade the OpenXC library from the Python Package Index (PyPI) with
pip at the command line:
$ [sudo] pip install -U openxc
If you intend to use the library to connect to a vehicle interface via USB, you
must also install a native USB backend -
libusb-1.0 is the recommended
Mac OS X
First install Homebrew, then run:
$ brew install libusb
libusbis available in the main repository:
$ sudo apt-get install libusb-1.0-0
$ sudo pacman -S libusbx
Download and install the OpenXC VI USB driver. You must install the driver manually through the Device Manager while the VI is plugged in and on - either running the emulator firmware so it never turns off, or plugged into a real car.
Install the VI USB driver as in a regular Windows installation.
If you get the error
Skipping USB device: [Errno 88] Operation not supported or unimplemented on this platformwhen you run any of the OpenXC Python tools, make sure you do not have the
libusbCygwin package installed - that is explicitly not compatible.
Using the development version
You can clone the repository and install the development version like so:
$ git clone https://github.com/openxc/openxc-python $ cd openxc-python $ pip install -e .
Any time you update the clone of the Git repository, all of the Python tools will be updated too.