Thonny 64bit7/20/2023 ![]() You have to tell VisPy where to find this glfw3.dll file. Copy/move these three files into your Thonny application folder, so that they reside in the same location as your thonny.exe file: Open the GLFW download (a zip file), then navigate to the lib-mingw folder there are three files within this ( glfw3.dll, libglfw3.a, and libglfwdll.a). I had issues using the 64-bit binaries, so I’m directing you to use the 32-bit version: The 32-bit binaries will run fine on 64-bit Windows Download the Windows pre-compiled binaries for GLFW from. GLFW is an open-source library for OpenGL, OpenGL ES and Vulkan. Moreover, your portable Thonny + p5 will run on Windows computers without Microsoft Visual C++ package. Note that once you’ve successfully completed this step, you no longer require Microsoft Visual C++. ” error, you’ll need to install the necessary build tools then run the pip command again. This will install p5 and its dependencies (glfw, triangle, vispy, numpy, Pillow, freetype-py).Ĭlose the console window once this is done. Type pip install p5 into the console and hit enter. To do this, select Tools > Open system shell… You want these packages to install to your Thonny application folder this way, when you copy your Thonny folder to your USB drive, it will include the p5 packages. Thereafter, it auto-saves each time you run. The first time you run a new script, Thonny will ask you to save the file. If you hover over any button, a tool-tip will display its associated keyboard shortcut ( F5 in this case). You use the run button (green circle with the ▶ icon) to run your script. Test out Thonny with a simple print('hello world'). At the time of writing, version 3.2.6 is the latest releaseĮxtract the zip file you’ve downloaded, then run the thonny.exe file to launch Thonny:Īt the first prompt, you may change the Language setting, but stick with the default Initial Settings (of Standard): To begin, download the portable version of Thonny from. But, because p5 is a recreation of the Processing API, it’s far more limited, hasn’t been in development for very long, and cannot leverage the Processing library ecosystem. Unlike Processing’s Python mode, p5 is compatible with Python 3 and Python libraries that use C extensions (e.g. This approach has it’s advantages and disadvantages. Rather, p5 is a recreation of Processing that’s running on pure Python with no Processing/Java layer under the hood. P5 is sort of Python ‘clone’ of Processing, that doesn’t actually use Processing to generate visual output. So, you may wonder: what’s the difference between p5 and Processing’s Python Mode? Python Mode ‘speaks’ directly to Processing it’s as close as you can get to pure Processing without writing Java, because all of your Python instructions are translated into instructions for Processing to carry out. ![]() There’s also a Python Mode for Processing, which I have written about extensively. P5 – not to be confused with p5.js – is a Python package based on the core ideas of Processing. It’s a stand-alone program that you simply run directly off your USB drive, or from wherever you choose to copy it to your computer (i.e. Portable ApplicationsĪ ‘portable’ application is one that does not include an installer. It’s multi-platform (Windows, Mac, Linux), open-source, and there’s a portable version too. The Thonny user interface is stripped back, but you can display several extra panels, like a panel to list your variables, an outline panel for your functions, an object inspector, an interactive debugger, a shell, a plotter, and more. In a downloadable zip file, less than 30 MB in size, you get a neat editor bundled with Python (version 3.7 at the time of writing). ![]() Thonny offers a quick and easy way to get coding in Python. If you haven’t heard about Thonny, it’s a Python IDE catering to any beginners looking to dabble in Python. The process is similar for Mac and Linux setups, although I will not cover the procedure for these platforms. This post covers how to roll-your-own portable Thonny + p5 IDE for Windows computers. This is quite different from p5 – like Processing.py, py5 also leverages Processing’s core libraries. I’ve written a more recent post on combining Thonny and py5. This Thonny-p5 combo is also handy for teaching programming in computer labs where students cannot install software, or any situation where you’d prefer to run an application in a portable fashion. There are situations where you may prefer to use p5 over Processing Python Mode / Processing.py, which I discuss in this post. You can combine Thonny and p5 for a Processing-esque, Python 3 development environment that runs off a USB drive.
0 Comments
Leave a Reply. |