Pimoroni FanShim Issues

Hi Dietpi troubleshooters, hoping you can help a newbie,

I have bought a FanShim for my RP 3 B+ from https://shop.pimoroni.com/products/fan-shim

I sent the below to Pimoroni

I am following the install instructions for the controller at


But I am getting the following error

dietpi@DietPi:~/fanshim-python/examples$ sudo ./install-service.sh --on-threshold 65 --off-threshold 55 --delay 2
Fan SHIM controller requires Python 3 pip
You should run: ‘sudo apt install python3-pip’

However when I try to run the above…

dietpi@DietPi:~/fanshim-python/examples$ sudo apt install python3-pip
Reading package lists… Done
Building dependency tree
Reading state information… Done
python3-pip is already the newest version (18.1-5+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I have done a full ‘sudo apt install’ and am fully updated. Do you have any ideas?

But their response…

It’ll be something dietpi related, our software is written for Raspbian which has a lot of packages that dietpi doesn’t. If using dietpi is essential then you could try installing everything Python related to see if that helps, but you should find it’ll work fine if you use full Raspbian or even Raspbian Lite if you need something lighter on resources.

Kind regards,

Thanks for your help or ideas!


many thanks for your report. Basically DietPi is a Raspbian (for Raspberry Pi devices), just with reduced amount of packages. :wink:

  1. Did you install Python using dietpi-software?
  2. Did you tried using user root to perform installation?
  3. what is the output of which pip3?

I tried to install on my demo RPi3B+ and all was working fine

root@DietPi3:~/fanshim-python/examples# ./install-service.sh --on-threshold 65 --off-threshold 55 --delay 2
Setting up with:
Off Threshold:  55 C
On Threshold:   65 C
Delay:          2 seconds
Preempt:        no
Disable LED:    no
Disable Button: no
Brightness:     255

To change these options, run:
sudo ./install-service.sh --off-threshold <n> --on-threshold <n> --delay <n> --brightness <n> --venv <python_virtual_environment> (--preempt) (--noled) (--nobutton)

Or edit: /etc/systemd/system/pimoroni-fanshim.service

Checking for rpi.gpio >= 0.7.0 (for Pi 4 support)
rpi.gpio >= 0.7.0 already installed
Checking for Fan SHIM
Fan SHIM already installed
Checking for psutil >= 5.6.7
Installing psutil
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting psutil
  Downloading https://www.piwheels.org/simple/psutil/psutil-5.7.0-cp37-cp37m-linux_armv7l.whl (281kB)
    100% |████████████████████████████████| 286kB 806kB/s
Installing collected packages: psutil
Successfully installed psutil-5.7.0

Installing service to: /etc/systemd/system/pimoroni-fanshim.service
Created symlink /etc/systemd/system/multi-user.target.wants/pimoroni-fanshim.service → /etc/systemd/system/pimoroni-fanshim.service.
● pimoroni-fanshim.service - Fan Shim Service
   Loaded: loaded (/etc/systemd/system/pimoroni-fanshim.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-06-29 17:15:07 CEST; 29ms ago
 Main PID: 1269 (python3)
    Tasks: 1 (limit: 2319)
   Memory: 1.2M
   CGroup: /system.slice/pimoroni-fanshim.service
           └─1269 /usr/bin/python3 /root/fanshim-python/examples/automatic.py --on-threshold 65 --off-threshold 55 --delay 2 --brightness 255

Jun 29 17:15:07 DietPi3 systemd[1]: Started Fan Shim Service.

Hi Joulinar,

Logged in as root. Uninstalled python via dietpi-software and reinstalled

Re-ran the setup. All working now

Thanks for your help!