These instructions describe how to install PyLabRobot.
Note that there are additional installation steps for using the firmware (universal) interface to Hamiltons, see below.
It is highly recommended that you install PyLabRobot in a virtual environment. virtualenv is a popular tool for doing that, but you can use any tool you like. Note that virtualenv needs to be installed separately first.
Here’s how to create a virtual environment using virtualenv:
mkdir your_project cd your_project python -m virtualenv env source env/bin/activate
Installing from PyPI is the easiest and recommended way to install PyLabRobot.
The following will install PyLabRobot and the essential dependencies:
pip install pylabrobot
If you want to build documentation or run tests, you need install the additional dependencies. Also using pip:
pip install pylabrobot[docs] pip install pylabrobot[testing]
There’s a multitude of other optional dependencies that you can install. Replace
[docs] with one of the following items to install the desired dependencies.
fw: Needed for firmware control over Hamilton robots.
http: Needed for the HTTP backend.
websockets: Needed for the WebSocket backend.
simulation: Needed for the simulation backend.
venus: Needed for the VENUS backend. This is PyHamilton.
server: Needed for LH server, an HTTP front end to LH.
opentrons: Needed for the Opentrons backend.
plate_reading: Needed to interact with the CLARIO Star plate reader.
To install multiple dependencies, separate them with a comma:
pip install pylabrobot[fw,server]
Or install all dependencies at once:
pip install pylabrobot[all]
Alternatively, you can install PyLabRobot from source. This is particularly useful if you want to contribute to the project.
git clone https://github.com/pylabrobot/pylabrobot.git cd pylabrobot pip install -e '.[dev]'
See CONTRIBUTING.md for specific instructions on testing, documentation and development.
Using the firmware interface with Hamilton robots#
If you want to use the firmware version of the Hamilton driver, you need to install a backend for PyUSB. You can find the official installation instructions here. The following is a complete (and probably easier) guide for macOS, Linux and Windows.
Reminder: when you are using the firmware version, make sure to install the firmware dependencies as follows:
pip install pylabrobot[fw]
You should be all set!
brew install libusb
Download and install Zadig.
Make sure the Hamilton is connected using the USB cable and that no other software is running.
Open Zadig and select “Options” -> “List All Devices”.
Select “ML Star” from the list.
Select “libusbK” using the arrow buttons.
Click “Replace Driver”.
Click “Close” to finish.
These instructions only apply if you are using VENUS on your computer!
If you ever wish to switch back from firmware command to use
VENUS backend or plain VENUS, you have to replace the updated driver with the original Hamilton one.
This guide is only relevant if ML Star is listed under libusbK USB Devices in the Device Manager program.
If that”s the case, double click “ML Star” to open this dialog, then click “Driver”.
Click “Update Driver”.
Select “Browse my computer for driver software”.
Select “Let me pick from a list of device drivers on my computer”.
Select “Microlab STAR” and click “Next”.
Click “Close” to finish.
If you get a
usb.core.NoBackendError: No backend available error: this may be helpful.
If you are still having trouble, please reach out on the forum.