You can now move the thonny_py5 folder anywhere you like on your system, copy it to other Linux computers, and so on. Sudo apt-get remove -purge python3.9 python3.9-dev python3.9-venv This is necessary to build py5 you can remove them later. Step 1 – Start by installing a few Python 3.9 packages. But, there are “alt-variants” of Thonny that use Python 3.9 instead of 3.7, which you’ll use instead. However, py5 requires Python 3.8 or higher. At the time of writing, Thonny (at version 3.3.10) comes bundled with Python 3.7.9. The result is an IDE that resembles that of the Processing PDE. The aim here is a self-contained bundle that runs even if the user’s computer is missing Python, Java, or any other packages that py5 or Thonny ordinarily require. There are other ways to install py5 – with Python, Anaconda, and for Jupyter notebooks. Note that you’re creating a portable IDE. I’ll also provide a quick-start guide to writing py5 code with Thonny. I’ve explained each step, though, so you can adapt the process accordingly for other platforms. The process is similar for Mac and Linux setups, although I will not cover the procedure for those platforms. Ubuntu and other Debian distros should work with these instructions. This post covers how to roll your very own portable Thonny + py5 IDE on Linux (Mint in my case). What’s more, you can run a portable app off a USB drive. In other words, if you’re using a system like mine (Debian-based Linux, in this case), I can zip up the files and send the archive to you all you need to do is extract and run it! No installation process required. This is useful for different reasons, including that it’s easier to distribute something that beginners can simply click and run. I prefer to run applications in a ‘portable’ fashion where I can. Figure 1: A faux Processing.py/Python Mode IDE set up with Thonny and py5 I’m delighted with the result (Figure 1). So, I promptly set out to see if I could combine py5 with Thonny, a fantastic Python IDE for beginners. I’ve been involved with Processing.py for some time, and I got excited when I read this. Processing.py and py5 do not share any code but py5 benefits from code in the Processing core libraries written to accommodate Processing.py.” Py5 is similar to Processing.py in that both use Python syntax but their implementations are very different. “Processing.py is the spiritual ancestor to and inspiration for py5. p5 is a sort of Python ‘clone’ of Processing, that doesn’t actually use Processing to generate visual output. Previously, I wrote a post on combining the Thonny editor and p5. You can check out the project repo to track how work on the plug-in is progressing. I’ve begun working on a Thonny plug-in, thonny-py5mode, that automates the installation steps I cover in this post. I very recently stumbled upon py5, a Python version of Processing for Python 3.8+ that uses Processing’s core libraries under the hood (thanks to some JPype magic).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |