Cannot find micropython Servo package with Thonny

Searching for micropython packages using Manage packages in Thonny does not find the Servo package.
Searched using: micropython-servo
Micropython v1.24.1 on 2024-11-29: Raspberry Pi Pico with RP2040
Tried: Micropython(Raspberry Pi Pico) - Board CDC @ COM10
MicroPython (RP2040) - Board CDC @ COM10

2 Likes

Not sure why search doesnā€™t find it, but itā€™s located here:
servo Ā· PyPI
You can download the package and select ā€˜Install from local fileā€™ in package manager.

2 Likes

I didnā€™t see on the servo Ā· PyPI website how to download the .whl file to my laptop so I installed the servo package (pip install servo) to my laptop. The install cmd window listed where the .whl file was extracted.
I used the ā€œInstall from local fileā€ option on Thonny using the .whl file.
Thanks for the help

2 Likes

Thanks for letting us know that you got it sorted. The ā€˜Download filesā€™ button on the servo1 page gives you the option to download servo-1.tar.gz which will also install from package manager.

2 Likes

Did you check this one? micropython-servo Ā· PyPI

1 Like

The servo 1 project (servo-1.tar.gz) did not work. The package is missing main.py as seen in the file list on the pico. I did download the .gz file from pypi.org and install from the .gz file.

The micopython-servo 1.0.1 (micropython_servo-1.0.1-py3-none-any.whl) does work. I downloaded the .whl file from pypi.org. It installed correctly and the main.py file is present.

Thanks again

main.py is not part of the library. It might be included with some downloads as an example sketch.

1 Like

Same problem here !
Thonny is unable to locate the micropython servo library on PyPi but itā€™s there.
Iā€™ve downloaded the two versions as the thread indicate here and try to install manually but I got an error

install install /home/lemairem/Downloads/micropython_servo-1.0.1-py3-none-any.whl
Looking in indexes: http://127.0.0.1:36628, piwheels - Simple index
Processing /home/lemairem/Downloads/micropython_servo-1.0.1-py3-none-any.whl
127.0.0.1 - - [18/Dec/2024 22:56:14] ā€œGET /install/ HTTP/1.1ā€ 404 -
ERROR: Could not find a version that satisfies the requirement install (from versions: none)
ERROR: No matching distribution found for install
Error Command ā€˜[ā€™/home/lemairem/.cache/pipkin/workspaces/d12471e3dff4dc2a9742567e16f4cea8/bin/python3ā€™, ā€˜-Iā€™, ā€˜-mā€™, ā€˜pipā€™, ā€˜ā€“no-colorā€™, ā€˜ā€“disable-pip-version-checkā€™, ā€˜ā€“trusted-hostā€™, ā€˜127.0.0.1ā€™, ā€˜installā€™, ā€˜ā€“no-compileā€™, ā€˜ā€“use-pep517ā€™, ā€˜ā€“upgrade-strategyā€™, ā€˜only-if-neededā€™, ā€˜installā€™, ā€˜/home/lemairem/Downloads/micropython_servo-1.0.1-py3-none-any.whlā€™, ā€˜ā€“index-urlā€™, ā€˜http://127.0.0.1:36628ā€™]ā€™ returned non-zero exit status 1.

Thanks for any pointers
Marc

Hey @Marc285770,

I seem to remember @James46717 made a post yesterday detailing that PyPi was currently being attacked by bots and had been inaccessible.

Iā€™m unsure of the specific nature of the issues people were facing, but this could have been the root cause. Can you confirm that you are still experiencing the error today?

1 Like

Hi Zach,
Sorry for the delay to answer
I tried this morning but no success. If I type ā€œservoā€ I have results for my query but ā€œmicropython servoā€ I still have nothing.
Happy New Year to all by the way,
Cheers
Marc

Hey @Marc285770,

Thanks for confirming! Just wanted to check your process for installing the packages manually. The error youā€™re receiving seems to be typically caused by some sort of incorrect data in the command. Which seems strange given you should be able to manually install it without using the terminal at all. Iā€™ll detail the steps Iā€™ve taken to manually install the file as per Jeffā€™s method from earlier in the thread.


Selecting ā€œTools > Manage Packagesā€ and then selecting ā€œInstall from local fileā€ as seen in the image below.

This will allow you to navigate to the download location of the .whl file and select it to be manually installed.


I assume these are the steps youā€™ve taken, and are still receiving the error? If so, it may be worth reading through some of the steps taken in this Stack Overflow forum thread.

It is a few years old but these solutions may prove useful still. There are also some useful debugging commands that may provide more information on the error.

Hope this helps!

Hi Zach,
Still no results. I still receive the same message that when I first tried to manually install microservo python.
I tried a few solutions from the threads but Iā€™m at a lost presently
I must point out that Iā€™m on Bookworm with a Raspberry Pi 5 as the main computer, updated today
Marc

Ok, Iā€™ve redirected my search and the problem is still going on with no stable solution for the foreseable future :cry:

Hi @Marc285770

Looking at it, Thonny has been updated to version 4.1.7 which will address the issue with not being able to find packages if you update your version of Thonny you should be able to search for them via the package manager.