# Error installing py5 in Windows 10 using Thonny

**URL:** <https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080>\
**Category:** p5py\
**Created:** [December 8, 2022, 9:42pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080 "2022-12-08T21:42:05Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![maurix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maurix/32/17553_2.png) [@maurix](https://discourse.processing.org/u/maurix)\
**Post date:** [December 8, 2022, 9:42pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/1 "2022-12-08T21:42:05Z")

</div>

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

What can I do?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [December 9, 2022, 9:31am UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/2 "2022-12-09T09:31:31Z")

</div>

Hi @maurix,

Welcome to the forum! 😉

> [@maurix](#):
>
> Check the logs for full command output.

Can you post the full logs?

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [December 9, 2022, 10:22am UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/3 "2022-12-09T10:22:52Z")

</div>

Cheers @maurix!

I think I have seen something similar when Windows fails to install JPype properly.

I have a few Ideas for you to try:

1. This Thonny portable, in theory, has everything pre-installed [Dropbox - thonny-4-with-py5-windows-portable.zip - Simplify your life](https://www.dropbox.com/s/3ue4cx3yf372teg/thonny-4-with-py5-windows-portable.zip?dl=0)

2. 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.

3. Another way would be to (A) install a Miniconda Python distribution, (B) follow these steps: [Install py5 — py5 documentation](http://py5coding.org/content/install.html#brief-steps) then (C) in Thonny Tools\> Options \> Interpreter, point it to use the Python from the Conda Environment.

---

<div class="post-metadata">

**Author:** ![maurix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maurix/32/17553_2.png) [@maurix](https://discourse.processing.org/u/maurix)\
**Post date:** [December 11, 2022, 4:42pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/4 "2022-12-11T16:42:14Z")

</div>

Thanks a lot for your replies,

@josephh  
which file di log in Thonny shoul I send? backend.log? …?

@villares  
the portable version of Thonny does work, unfortunately it’s a bit slow, I’d like to use in the installed version

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [December 11, 2022, 9:26pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/5 "2022-12-11T21:26:24Z")

</div>

> [@maurix](#):
>
> which file di log in Thonny shoul I send? backend.log? …?

I just installed Thonny and `py5` and you should have this log window when you install the package:

 ![Screenshot 2022-12-11 22:24:18](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/3/8/38c07e757e6cc92a62d9288db9c4877254704939.png)

(it worked fine for me on Linux with Python 3.11)

You can copy the logs from this window.

---

<div class="post-metadata">

**Author:** ![maurix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maurix/32/17553_2.png) [@maurix](https://discourse.processing.org/u/maurix)\
**Post date:** [December 11, 2022, 9:57pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/6 "2022-12-11T21:57:12Z")

</div>

@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/
----------------------------------------

```

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [December 12, 2022, 12:53am UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/7 "2022-12-12T00:53:01Z")

</div>

Cheers @maurix!

I think the next step would be to install [https://visualstudio.microsoft.com/visual-cpp-build-tools/](https://visualstudio.microsoft.com/visual-cpp-build-tools/)  
But I’m afraid you won’t see any performance improvement. It will be the same library as in the portable…

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)

---

<div class="post-metadata">

**Author:** ![maurix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maurix/32/17553_2.png) [@maurix](https://discourse.processing.org/u/maurix)\
**Post date:** [December 13, 2022, 11:57am UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/8 "2022-12-13T11:57:20Z")

</div>

@villares  
I managed to install py5 in Thonny, but I can’t import py5…  
I attached the screenshot to show the problem  
thanks

 ![2022-12-13 12_55_32-Thonny - untitled @ 16 _ 13](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/b/9/b9ecde273278f4ab6a7dda442deb06bf2db67e81.png)

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [December 13, 2022, 12:34pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/9 "2022-12-13T12:34:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![maurix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maurix/32/17553_2.png) [@maurix](https://discourse.processing.org/u/maurix)\
**Post date:** [December 13, 2022, 6:24pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/10 "2022-12-13T18:24:32Z")

</div>

Hi @villares  
here you are  
thanks

 ![thonny](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/0/2/02b78268063cf43340ab936e4d68274a19bc1e03.png)

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [December 13, 2022, 7:19pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/11 "2022-12-13T19:19:32Z")

</div>

I see, looks like there is more than one Thonny and more than one Python indeed.  
Try to set this Thonny to look for a Python interpreter at:  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/9/c/9cd5734ae8ec06104ee292f9b87031de70b343f9.png)  
I’m not sure it will work, but could be worth a try…

---

<div class="post-metadata">

**Author:** ![maurix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maurix/32/17553_2.png) [@maurix](https://discourse.processing.org/u/maurix)\
**Post date:** [December 13, 2022, 7:49pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/12 "2022-12-13T19:49:59Z")

</div>

There is just ipython.exe in the subdirectory scripts, but no python.exe at that location,…  
thanks

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [April 22, 2023, 6:50pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/13 "2023-04-22T18:50:09Z")

</div>

Hi @maurix, did you manage to make it work?

Since we last exchanged messages, I think that maybe the portable improved a bit at [Dropbox - thonny-4-with-py5-windows-portable.zip - Simplify your life](https://www.dropbox.com/s/3ue4cx3yf372teg/thonny-4-with-py5-windows-portable.zip?dl=0)

Another strategy would be to install miniconda (or anaconda) and follow [py5 install instructions](https://py5coding.org/content/install.html), 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.

---

<div class="post-metadata">

**Author:** ![maurix](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maurix/32/17553_2.png) [@maurix](https://discourse.processing.org/u/maurix)\
**Post date:** [April 30, 2023, 4:24pm UTC](https://discourse.processing.org/t/error-installing-py5-in-windows-10-using-thonny/40080/14 "2023-04-30T16:24:32Z")

</div>

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!
