Development Setup

Some of you might be interested in testing out the Python protocols you've coded using our API locally on your computer. To do this, you'll need to install some of our software on your computer. Here are the step-by-step instructions to do that. 

Individual projects may have additional instructions, so be sure to check out the various project READMEs, too.

Environment and Repository

Our repository is located here. Your computer will need the following tools installed to be able to develop with the Opentrons platform:

If you are not familiar with github, please download our respository as a zip file

If you are familiar with github, please use git to clone our repository.

Setting up For Simulation

Once you have our repository on your computer, please check that the above are correctly installed on your computer. If they are not, see the Troubleshooting section below.

To check that you have everything you need, navigate to your native terminal which can be found by searching the keyword term terminal .

Next type the following

python --version

If Python is not at least version 3.5.6 please install the latest version in the link above.
If either make or yarn are not found, please view the Troubleshooting section.

If your environment is correctly set up, we can now begin to set up your computer for simulation.

While still in your terminal, navigate to the top-level opentrons folder.
Here is an example of what that may look like:

Once here, type the following:

make install

If no errors arise, you should then be able to navigate to the api folder.

Once here, type the following:

make local-shell

Now you can do python scripting, or run a python file from the terminal line. You can also use Jupyter Notebook (if you have it installed) for simulation by simply typing jupyter notebook  in this directory to launch it.

If you wish to install this globally on your system so you do not have to type make local-shell  every time you wish to simulate, then do the following:

pip install dist/opentrons-*.whl

Note you must run make local-shell  or make wheel  before the above command. 


For Windows
Most Windows computers do not come pre-installed with Make or Yarn. Please follow these instructions to rectify that.

For Mac

Mac natively comes pre-installed with Python 2.7. You must first install Python 3.6 from the web. Then you have two options to set your path correctly for macOS or Linux.

  • pyenv which is a python version manager. View their README for instructions.
  • Set the environment variable OT_PYTHON to the executable path of python 3.6

To find the executable path of python 3.6 type:
which python3

Then you will take this path and set the environment. Look up exactly what this command is for your given system. In macOS, the command would be:
export OT_PYTHON=/path/to/python3/ 

As always, reach out to support if you have further questions at or through intercom.

Did this answer your question?