I’ve got this error installing py5 in the plug-in window in Thonny 4.0.1:
–prefix= --compile --install-headers ‘C:\Users\mauri\AppData\Roaming\Thonny\plugins\Python38\Include\jpype1’ Check the logs for full command output.
Error: process returned with code 1
Open Thonny’s Toos > Open System Shell… there you try to pip install jpyp1 and you will see more clearly the error (because it will not be in the small alert dialog). I suspect you’ll need to install some Microsoft CPP tooling to be able to compile JPype.
Another way would be to (A) install a Miniconda Python distribution, (B) follow these steps: Install py5 — py5 documentation then (C) in Thonny Tools> Options > Interpreter, point it to use the Python from the Conda Environment.
@josephh @villares
I’m facing the problem n. 2 described by villares (see the final part of the log below).
I’ll try to install the required cpp software
many thanks
copying native\jars\org.jpype.jar -> build\lib.win32-3.8
Call build ext
building '_jpype' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
I’m having some irritating delay for the sketches to start on Windows, and I’m using Thonny… I’m not sure what is the cause. I have no access to Windows for a while, but we could try running the sketch from the command line to see if it opens more quickly…
(Otherwise, when the sketch is already running, I see no performance difference on Thonny)
Oh @maurix, I’m so sorry you are going through these troubles! I really wish I could help more.
Let me try to help you investigate what is going on. Without much more evidence I would guess the shell window in the background is using a different interpreter, for some reason.
Is it the Thonny Console/Shell? When you hit the ‘stop’ button does it say Python 3.8?
Can you open the Tools > Options > Interpreter panel on Thonny to have a look?
Another strategy would be to install miniconda (or anaconda) and follow py5 install instructions, that suggests you to create a “conda env”, with that conda env active you could pip install thonny and have a Thonny that uses that Python env. Also, I think you should be able to use the thonny-py5mode plugin to install the JDK in this case too.
Thanks, Villares,
I’m not on the subject anymore (at the moment), but I’ve given a try to the portable version of Thonny and it seems to work for me. I appreciate your suggestions!