Phidgets Stepper Motor controller install for Python

Related: Phidgets Matlab install

  1. Phidgets Prereqs are distinct for Linux, Mac and Windows.


     apt install autoconf gcc libusb-1.0-0-dev make


     brew install gcc


    Install MinGW-W64 compiler (GCC, GFortran) using options:

    Architecture Threads Exception
    x86_64 posix seh
  2. Download Phidgets Libraries
  3. Install Phidgets Libraries. For Mac and Windows just run the installer. For Linux:
    tar xf libphidget22*.tar.gz
    cd libphidget22*
    make -j4
    make install
  4. Download Phidgets Python API, extract and then install Phidgets Python API with command

     python install

    Note that currently PyPi has Phidgets 2.1.x, which is obsolete.

  5. reboot

Test Python API

Phidgets Python Examples


Phidgets Python Install

Phidgets Python Troubleshooting

THESE COMMENTS ARE FOR OBSOLETE Phidgets 2.1.x. I have not yet updated the text below for Phidgets 2.2.x.

RuntimeError: Platform not supported

The Python Phidgets 2.1.8 library was last updated in 2014, and so it’s a little out of date. For Linux systems, fix this by editing in the following places under your Python install’s site-packages/Phidgets/

  • line 23, change from sys.platform == 'linux2': to

      elif 'linux' in sys.platform:
  • Devices/ line 61, change the end from or sys.platform == 'linux2': to

      or 'linux' in sys.platform:
  • line 32, change from sys.platform == 'linux2': to

      elif 'linux' in sys.platform:
  • For Linux only, copy udev rule so that you don’t have to use sudo for all programs using the Phidget controllers:

      cp udev/99-phidgets.rules /etc/udev/rules.d/

Leave a Comment