Installation

Install OpenHTF with pip on Windows, Linux or macOS. Supported Python versions, optional extras for USB and serial plugs, virtual environments, and common install errors.

Last updated · Verified with OpenHTF 1.6.1

OpenHTF is a pure-Python package published on PyPI as openhtf.

Requirements

Python3.10 or newer (OpenHTF 1.6.x). The last release for Python 3.7–3.9 is 1.5.2.
OSWindows, Linux, macOS. Colored console output uses colorama and works on all three.
BrowserAny modern browser for the Operator UI; it is served by the test process.

Install with pip

Use a virtual environment per test station or per project so instrument-library versions stay pinned:

Terminal
python -m venv .venv
source .venv/bin/activate        # Windows PowerShell: .venv\Scripts\Activate.ps1
pip install openhtf

Check the install:

Terminal
python -c "import openhtf; print(openhtf.__version__)"
Terminal
1.6.1

Optional extras

The core package has no hardware dependencies. Extras pull in the libraries the bundled plugs need:

ExtraInstallsEnables
openhtf[usb-plugs]libusb1, M2Cryptoopenhtf.plugs.usb: ADB and Fastboot over USB (Android DUTs).
openhtf[serial-collection-plug]pyserialopenhtf.plugs.generic.serial_collection.SerialCollectionPlug.
openhtf[examples]pandasThe upstream measurements.py example (to_dataframe()).
openhtf[update-units]xlrdOnly for regenerating units.py from the UNECE spreadsheet; not needed to use units.
Terminal
pip install "openhtf[serial-collection-plug]"

Your own plugs bring their own libraries: pip install pyvisa pyvisa-py for SCPI instruments, pyserial for serial DUTs, pymodbus for PLCs.

Pin the version

A station should not pick up a new OpenHTF release by accident. Pin it in requirements.txt:

requirements.txt
openhtf==1.6.1
pyvisa==1.14.1
pyvisa-py==0.7.2

Every page on this site states which release its examples were verified against; Releases lists what changed between versions.

Install from source

To try unreleased fixes from master:

Terminal
pip install git+https://github.com/google/openhtf.git

Common install problems

On this page

First-pass yield
0%4.1
Track with TofuPilot