Python 3 Check

We assume you already have Python 3 installed on your computer. Note we do not support Python 2 - it's deprecated and no longer supported!

At your command line prompt of choice, check your Python version with python --version

Install hidapi

From the command line, manually install hidapi with:

Download: file
pip3 install hidapi

Install Blinka

To install Blinka and its dependencies, run:

Download: file
pip3 install adafruit-blinka

Set Environment Variable 

You'll need to set this variable every time before running CircuitPython code. To do this, we set the environment variable to BLINKA_MCP2221.,

You can set the variable by running:

Download: file
export BLINKA_MCP2221="1"

Then, verify that the variable is set by running:

Download: file
echo $BLINKA_MCP2221
Don't forget this step. Things won't work unless BLINKA_MCP2221 is set.

Check that Platform was detected

In the same terminal window you ran export BLINKA_MCP2221="1", run python.

At the REPL, run:

import board

dir(board)

If you get no errors and see a list of all the pins available, you're good to go!

This guide was first published on Dec 22, 2019. It was last updated on Dec 22, 2019.
This page (Mac OSX) was last updated on Jun 03, 2020.