Error when installing Plugin from PyPi

137 views
Skip to first unread message

Ryan Dehmoubed

unread,
Mar 10, 2021, 5:16:34 PM3/10/21
to thonny

Hi Aivar and Thonny Community,

I developed and tested a local plugin called Thonny-JuiceMind that sets the Rasberry Pi theme as a default theme for Thonny and adds a toggle button to alternate between Microcontroller programming and programming on your computer.

I tested it locally on my computer (By cloning the most recent Thonny repository and putting it plugin into the Plugins folder of the Thonny package) and it works as expected. Additionally, once I upload the Plugin to Pypi and pip installed the plugin from my command line, the forked Github Thonny package is able to render the plugin successfully. (Thonny repository that I cloned: https://github.com/thonny/thonny.git)

However, when I try downloading Thonny from the official website (https://thonny.org/) and searching for PyPi under manage Plugins, the plugin will appear, but I am getting the following error message that says that the plugin is outdated and does not allow me to download the plugin into the Virtual environment, which is really weird because I specifically mentioned that install_requires=[“thonny >= 3.2.1”].

Thonny-JuiceMind plugin appearing under manage plugins: [First image]

Error message when I try to install it: [Second image]

Here is the code for my setup.py file and here is the link to the Thonny plugin that I developed: [Third image].

Link to Thonny Plugin:  https://github.com/ryandehmoubed99/thonny-JuiceMind.

I specified that the Thonny version should be greater the 3.2.0 and tagged it as an official release, but I am still very confused as to why it doesn’t work. Does the community have any suggestions?


Setup_image.png
Error_message.png
Plugin_appears.png

Aivar Annamaa

unread,
Mar 11, 2021, 1:43:57 AM3/11/21
to thonny
Hi!

Thonny's package manager uses PyPI-s Json API to get information about packages and PyPI is able to extract dependency information only from uploaded whl files, not tar.gz-s or zip-s. For an example, search "dist_requires" from https://pypi.org/pypi/thonny-edison/json and from https://pypi.org/pypi/thonny-JuiceMind/json

There used to be another requirement: if you upload bot tar.gz and whl, the whl must be uploaded first. I don't know whether this still holds, but I recommend following this.

I'll enhance the error message.

Best regards,
Aivar

Ryan Dehmoubed

unread,
Mar 11, 2021, 12:28:35 PM3/11/21
to thonny
Ok, this worked. Thank you!
Reply all
Reply to author
Forward
0 new messages