# New Windows "portable bundle" with Thonny IDE and py5 0.10.0a0 out!

**URL:** <https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967>\
**Category:** py5\
**Created:** [February 21, 2024, 3:08am UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967 "2024-02-21T03:08:54Z")\
**Posts on this page:** 12\
**Page:** 1

<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:** [February 21, 2024, 3:08am UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/1 "2024-02-21T03:08:54Z")

</div>

You can download it from [here](https://www.dropbox.com/scl/fi/2mnhk1k1yj6ab55p02z6q/thonny-4-with-py5-100-windows-portable.zip?rlkey=0du7vkd2nn2etlwftqw69hq1t&dl=0) more info and suggestions for testing [here](https://github.com/villares/villares.github.io/blob/master/como-instalar-py5/index-EN.md)

I you find any trouble, please report!

I wish I could make an AppImage equivalent for Linux (but it is beyond my skills), and also [re-package the Mac OS Thonny installer to include py5](https://github.com/thonny/thonny/discussions/3090#discussioncomment-8279000) (but I don’t have a Mac or an Apple dev signing key).

---

<div class="post-metadata">

**Author:** ![hx2A](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hx2a/32/14322_2.png) [@hx2A](https://discourse.processing.org/u/hx2A)\
**Post date:** [February 25, 2024, 12:52am UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/2 "2024-02-25T00:52:11Z")

</div>

> [@villares](#):
>
> I wish I could make an AppImage equivalent for Linux (but it is beyond my skills),

I did some searching and found this:

> **[Creating AppImages](https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages/cc2441518975caca23e9ce2dba6f08a22c678d1e)**
>
> Package desktop applications as AppImages that run on common Linux-based operating systems, such as RHEL, CentOS, openSUSE, SLED, Ubuntu, Fedora, debian and derivatives. Join #AppImage on irc.liber...

I can’t do this right now, but I should have time to experiment with this in the springtime.

---

<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:** [February 25, 2024, 1:23am UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/3 "2024-02-25T01:23:03Z")

</div>

One thing to consider, which might make my whole idea not a good idea, is that AppImages are read-only, so they might not be a good fit for an IDE with built-in Python. How would the user install new packages? Could we target a site-packages folder outside the AppImage? I don’t know.

An alternative to the AppImage strategy could perhaps be a bash script that installs everything we want. Currently Thonny provides this: ` bash <(wget -O - https://thonny.org/installer-for-linux)` ([the running bash source](https://thonny.org/installer-for-linux))

Update: I asked a friend who is very good at bash scripts to have a look…

---

<div class="post-metadata">

**Author:** ![hx2A](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hx2a/32/14322_2.png) [@hx2A](https://discourse.processing.org/u/hx2A)\
**Post date:** [February 25, 2024, 4:22pm UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/4 "2024-02-25T16:22:10Z")

</div>

> [@villares](#):
>
> One thing to consider, which might make my whole idea not a good idea, is that AppImages are read-only, so they might not be a good fit for an IDE with built-in Python. How would the user install new packages? Could we target a site-packages folder outside the AppImage? I don’t know.

Good point. If the AppImage is read only and the user could not install packages, I would guess that Thonny would give a strange error when the user tried to install something because a read only package jar would be completely unexpected.

How does Thonny package itself? Doesn’t it come with installed packages already? Why can’t we add our own package that adds a few more? It is open source after-all.

---

<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:** [February 25, 2024, 5:14pm UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/5 "2024-02-25T17:14:26Z")

</div>

Oh, yes, we can fork and add JDK & libraries.

- For the MacOS “Thonny + py5 bundle” I guess this is the way forward (following instructions on that link I posted in the first message).

- For Windows, the portable zip seems to be mostly working.

- Then for Linux, packaging to different distro ecossystems seems lots of trouble, so I thought about the AppImage strategy, but now I’m more inclined to try to hack the bash script, which is already installing stuff.

---

<div class="post-metadata">

**Author:** ![hx2A](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hx2a/32/14322_2.png) [@hx2A](https://discourse.processing.org/u/hx2A)\
**Post date:** [February 26, 2024, 2:01am UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/6 "2024-02-26T02:01:19Z")

</div>

Interesting. I just went through the packaging directory in the Thonny repo.

> <https://github.com/thonny/thonny/tree/master/packaging>
>
> //github.com/thonny/thonny/tree/master/packaging

It seems achievable, and the team does respond to questions. I don’t think we’d need to worry about multiple LInux distros. They don’t seem to do anything special for that for their own releases:

> **[Releases · thonny/thonny](https://github.com/thonny/thonny/releases)**
>
> Python IDE for beginners. Contribute to thonny/thonny development by creating an account on GitHub.

Let’s give this approach a try.

---

<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:** [November 13, 2024, 2:41am UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/7 "2024-11-13T02:41:51Z")

</div>

UPDATE: I’m putting the new versions here: [GitHub - villares/thonny-portable-with-py5](https://github.com/villares/thonny-portable-with-py5/)

---

<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:** [November 17, 2024, 7:46pm UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/8 "2024-11-17T19:46:10Z")

</div>

NEW UPDATE TODAY py5 0.10.3a1: Check [GitHub - villares/thonny-portable-with-py5](https://github.com/villares/thonny-portable-with-py5/)

---

<div class="post-metadata">

**Author:** ![dodo](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@dodo](https://discourse.processing.org/u/dodo)\
**Post date:** [November 18, 2024, 7:29am UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/9 "2024-11-18T07:29:28Z")

</div>

Hi Villares. The current version works amazing, thank you for this! I’ve run this on multiple systems (Windows), there seems to be a major lag between running the script and the canvas window showing up. Is this expected? Sorry I am completely new to py5 (processing user for a very long time). 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:** [November 18, 2024, 6:04pm UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/10 "2024-11-18T18:04:42Z")

</div>

Cheers @dodo! Thanks for sharing your experience, I’m glad it has been helpful.

I’m also worried about this lag, my students also complain about it taking too long to start & open the canvas, do you think the waiting time has increased in this latest iteration?

The py5 maintainer, @hx2A, has been working on this new feature called [Live Coding](https://py5coding.org/content/live_coding.html) available with module mode in the latest release, that tackles this as it updates the running sketch each time you save a source modification… Maybe this will help us, when available in imported mode…

---

<div class="post-metadata">

**Author:** ![hx2A](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hx2a/32/14322_2.png) [@hx2A](https://discourse.processing.org/u/hx2A)\
**Post date:** [November 20, 2024, 4:10am UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/11 "2024-11-20T04:10:48Z")

</div>

Hi, @dodo! Thank you for bringing the lag issue to my attention. I did not know this was a concern for users.

I thought about it for a bit and came up with a better design idea that would address this:

> <https://github.com/py5coding/py5generator/issues/557>
>
> From this discussion:
> 
> https://discourse.processing.org/t/new-windows-portable…-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/8
> 
> points out that running a Sketch through Thonny has an undesirable delay between the user hits the run button and when the Sketch window is open. Part of the delay is because the computer must start a new process that starts the JVM with all off the necessary Processing and py5 Jar files. Simply importing py5 itself does take a few seconds:
> 
> \`\`\`python
> In \[1\]: %time import py5
> Importing py5 on macOS but the necessary Jupyter macOS event loop has not been activated. I'll activate it for you, but next time, execute \`%gui osx\` before importing this library.
> CPU times: user 3.19 s, sys: 708 ms, total: 3.9 s
> Wall time: 4.99 s
> \`\`\`
> 
> And this machine in front of me is a MacBook Pro with an M1 chip.
> 
> Thonny launches each imported mode Sketch with a separate call to the command line tool, which must import py5 again each time. It would better to have some kind of Sketch server that imports py5 once and accepts requests from a client (ie Thonny) to launch Sketches. I don't think this would be that hard to build.
> 
> Also, such a Sketch server would be a better fit for using py5 via the PDE. The Sketch server doesn't magically solve some of the other PDE related problems discussed elsewhere but it would be a positive step for py5 + PDE.

This isn’t 5 minutes of work but it isn’t all that difficult either. We’d also need to update the Thonny plugin to use this new method after this enhancement is complete. It’ll get done though.

---

<div class="post-metadata">

**Author:** ![dodo](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@dodo](https://discourse.processing.org/u/dodo)\
**Post date:** [November 20, 2024, 7:21am UTC](https://discourse.processing.org/t/new-windows-portable-bundle-with-thonny-ide-and-py5-0-10-0a0-out/43967/12 "2024-11-20T07:21:11Z")

</div>

Thanks for the note @villares @hx2A !

Yes, the wait times are definitely a bit of pain at the moment. I teach beginner workshops and the feedback loop is critical between running code and executing it. Nevertheless, this has been a wonderful interface to work in so far otherwise and I’ll continue using it both in the studio and my classes. Look forward to the continued development on this !
