Closed plesiosaur closed 4 weeks ago
Thank you for your report @plesiosaur, I hope this issue might help us understand better what is going on and how to fix it!
When you say "install normally" (without a virtual environment) what method are you using? Thonny proposes several methods (I'm wary of the 3rd party distributions because they might be old):
I'm on Manjaro and I have been using previously the https://thonny.org/installer-for-linux script method.
I have also recently installed Thonny using pipx install thonny
(you'd have probably to install pipx) it is kind of a way of creating automatically a virtual environment.
Have you tried this or another method?
Thanks for the quick response. The way I installed Thonny was...
sudo dnf install thonny
...then I ran the command...
thonny
...and went to Tools --> Manage plug-ins, did a search for py5, selected thonny-py5mode, and clicked Install. When it was done, I quit Thonny and restarted it. Still, the py5 menu is absent from the menubar. When I return to the plugin page, the buttons are for Upgrade, Uninstall, "...", and Close.
Versions of my software (x86_64, Fedora40 Compiz-Mate) Python 3.12.4 Thonny 4.1.4 thonny-py5mode 0.4.7a0 py5 0.10.2a0 openjdk 21.0.4
Next week I will try some other installation methods you pointed out. I am running this Linux in a Virtualbox VM so that it's easy to jump back to an old snapshot before I installed a particular thing and try it another way.
The versions you have shown are the most recent and I was happy to learn this about the Fedora packaging! I'm afraid something else is not going well :(
It looks like ImageTK
lets Pillow (the modern version of PIL) work with tkinter
(https://pillow.readthedocs.io/en/stable/reference/ImageTk.html) and I was reminded recently that on some Linux distributions tkinter
(that is part of the Python standard library) does not come installed with the system Python. Could you try something like sudo dnf install python-tkinter
, and then reinstall Pillow maybe to see if it helps?
Without specifically installing these, I have them:
$ dnf list python3-pillow python3-tkinter Installed Packages python3-pillow.x86_64 10.3.0-1.fc40 python3-tkinter.x86_64 3.12.4-1.fc40
Something I learned might be important to have is python3-pillow-tk, thanks to this page: https://github.com/jepler/cropgui/issues/89
My system didn't have that package, so I installed it with...
$ sudo dnf install python3-pillow-tk
$ dnf list python3-pillow-tk Installed Packages python3-pillow-tk.x86_64 10.3.0-1.fc40
That fixed my issue. Now in Thonny I have the py5 menu in the menubar.
Thanks for the suggestions along the way.
Hi. When I use a Python virtual environment, I can get Thonny installed in it and the thonny-py5mode plugin works. However, when I've deactivated the virtual environment and try to install normally, your plugin doesn't load correctly for me. This is on Fedora 40 Compiz-Mate. When Thonny opens up, there is no "py5" menu in the menubar. The error output is:
2 lines up from here, it mentions the file /usr/lib64/python3.12/site-packages/PIL/init.py Well, when I open that file and look for ImageTk myself, it's not in the list of modules. Here is the top part of that file, so you can see what I see.
What packages are installed? Here is the relevant stuff, I think.
$dnf list python3 python3-tkinter thonny Last metadata expiration check: 0:22:01 ago on Thu 15 Aug 2024 10:47:16 AM EDT. Installed Packages python3.x86_64 3.12.4-1.fc40 python3-tkinter.x86_64 3.12.4-1.fc40 thonny.noarch 4.1.4-2.fc40