Thonny libraries import

981 views
Skip to first unread message

Enzo Pontone

unread,
Jan 7, 2021, 1:19:56 PM1/7/21
to thonny

Hi,
I need to import "adafruit-circuitpython-neopixel" library to control NeoPixel LEDs.
I tried by Package Manager but get this error:

Error installing 'adafruit-circuitpython-neopixel': [Errno 2] No such file or directory: 'C:\\Users\\SILVER~1\\AppData\\Local\\Temp\\tmphewtrfkq\\.github/workflows/build.yml', packages may be partially installed
Installing to: C:\Users\SILVER~1\AppData\Local\Temp\tmphewtrfkq\
Warning: micropython.org SSL certificate is not validated
Installing adafruit-circuitpython-neopixel 6.0.0 from https://files.pythonhosted.org/packages/da/63/99ee7cffc6a0c04a022178dfb303940dea3be1a76d2d340aaf01526d07a7/adafruit-circuitpython-neopixel-6.0.0.tar.gz
Process failed, return code: 1

Then I tried by downloading "adafruit-circuitpython-neopixel " from github an copying it to Thonny "lib" dir but if I try to import it can't be found.
How can I import libraries into Thonny and at the end of development into my nodeMCU board?
Thanks.

Aivar Annamaa

unread,
Jan 14, 2021, 7:14:21 AM1/14/21
to thonny
Hi!

Sorry for late reply.

Currently Thonny uses micropip.py instead of pip for installing packages when MicroPython or CircuitPython back-end is selected. This is because most of the packages meant for MicroPython can't be installed with regular pip. In your case it looks like the package can't be installed with micropip. I created an issue for this: https://github.com/thonny/thonny/issues/1541

> Then I tried by downloading "adafruit-circuitpython-neopixel " from github an copying it to Thonny "lib" dir but if I try to import it can't be found

You should download it (together with its dependencies) to the lib directory of your CircuitPython board.

Best regards,
Aivar

Reply all
Reply to author
Forward
0 new messages