I’m follow along with a tutorial to get started with using CircuitPython to control servos on my RaspberryPi (https://learn.adafruit.com/adafruit-16-channel-pwm-servo-hat-for-raspberry-pi/using-the-python-library), but during the installation I get an error that I can’t seem to fix or find any information on. After installing Blinka and then proceeding on to install CircuitPython, I am met with an error:
pi@raspberrypi:~/Desktop $ sudo pip install adafruit-circuitpython-servokit
Collecting adafruit-circuitpython-servokit
Using cached https://files.pythonhosted.org/packages/86/2d/a8ebfc83d88f121569c950b960734d72d00d404b085899b16626be58648b/adafruit-circuitpython-servokit-1.1.0.tar.gz
Collecting Adafruit-Blinka (from adafruit-circuitpython-servokit)
Could not find a version that satisfies the requirement Adafruit-Blinka (from adafruit-circuitpython-servokit) (from versions: )
No matching distribution found for Adafruit-Blinka (from adafruit-circuitpython-servokit)
Not really sure where to go with fixing this issue so I figured maybe someone with more experience could point me in the right direction
Adafruit-Blinka requires Python 3. It seems you’re trying to install it for Python 2, using pip.
Use pip3 as instructed in the tutorial you link to.
sudo pip3 install adafruit-circuitpython-servokit
Question
How to fix AdaFruit CircuitPython Blinka Installation Problem?
Answer
There are many reasons for not successfully installing CircuitPython Blinka, including the following:
(1) Not using pip3,
(2) Not using latest version of raspbian update and upgrade
I have successfull installed Blinka and CircuitPython on Rpi4B buster (release 2019sep26). I have also made a summary for you to compare and contrast your installation. You can also read the full installation record in the reference below:
Circuit Python and Blinka Installation Summary
pi@tlfong01:~ $ date Sun 03 Nov 2019 09:51:49 AM HKT
pi@tlfong01:~ $ uname -a Linux tlfong01 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux
pi@tlfong01:~ $ sudo apt-get update
pi@tlfong01:~ $ sudo apt-get upgrade
pi@tlfong01:~ $ sudo pip3 install –upgrade setuptools
pi@tlfong01:~ $ pip3 install RPI.GPIO
pi@tlfong01:~ $ pip3 install adafruit-blinka
Successfully installed Adafruit-PlatformDetect-1.3.4 Adafruit-PureIO-0.2.3 adafruit-blinka-3.0.0 rpi-ws281x-4.2.2 sysv-ipc-1.0.0
References
(1) Installing AdaFruit CircuitPython Blinka Libraries on Raspberry Pi – Lada Ada
(1) CircuitPython Blinka Installation Record – tlfong01
Appendices
Appendix A – Differences between CircuitPython Blinka and MicroPython Blinka
Introduction
This repository contains a selection of packages mirroring the CircuitPython API on hosts running micropython.
board – breakout-specific pin identities
microcontroller – chip-specific pin identities
digitalio – digital input/output pins, using pin identities from board+microcontroller packages
bitbangio – software-driven interfaces for I2C, SPI
busio – hardware-driven interfaces for I2C, SPI, UART
time – substitute functions monkey-patched to time module
Dependencies
The Micropython compatibility layers described above are intended to provide a CircuitPython-like API for devices which are running CPython or Micropython.
End of answer
Categories: Uncategorized
