Adafruit servo board: pip3 error: externally-managed environment

Hello,
I am new to linux and python and want to control servos with Adafruit 16-Channel Servo HAT for Raspberry Pi. I have Raspi 3b+ with recommended 64bit system

I am trying to get according to Tims tutorial https://core-electronics.com.au/guides/servo-hat-raspberry-pi/. When executing sudo pip3 install adafruit-circuitpython-servokit I get a error:
error: externally-managed-environment

I tried to find the issue on stack overflow and tried some suggested solutions using pipx or venv, but wihtout success. Is there any other way how to install this servokit?

Thank you very much,
Martin.

You can use the --break-system-packages Flag

sudo pip3 install adafruit-circuitpython-servokit --break-system-packages

error: externally-managed-environment is related to Bookworm OS, it needs a virtual environment setup.

It should work ok with Bullseye OS.

Cheers
Jim

1 Like

Hey! we have a guide on how to setup a virtual environment here using Thonny - you may find that helps in creating the environment. If you install your packages from within the thonny package manager you should be good to go :slight_smile:

1 Like