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 --version
from a terminal to check - you need a 3.6.x version, such as 3.6.8.Windows
- 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 yourPATH
, 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.py
script 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
Cygwin
From the
setup.exe
package list, select thepython
andpython-setuptools
packages. Then, inside Cygwin installpip
usingeasy_install
:$ easy_install pip
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
library.
Mac OS X
First install Homebrew, then run:
$ brew install libusb
Ubuntu
libusb
is available in the main repository:$ sudo apt-get install libusb-1.0-0
Arch Linux
Install
libusb
usingpacman
:$ sudo pacman -S libusbx
Windows
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.
Cygwin
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 platform
when you run any of the OpenXC Python tools, make sure you do not have thelibusb
Cygwin package installed - that is explicitly not compatible.
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.