How to install Processing Python Mode
Warning: Only use Processing Python Mode if you need to run legacy projects that depend on it. Also, it is incompatible with Processing 4.x. If you are starting to learn Processing and Python, check out “How to install and use py5” instead.
What’s this?
Processing is a Free and Open Source (FLOSS) programming platform started in 2001 by Casey Reas e Ben Fry, widely used by artists and to teach coding in a visual context. The Processing IDE is a text editor for code that can quickly execute your programs, called sketches.
With Processing you can not only generate raster and vector graphics, but interactive applications running on Linux, macOS or Windows. It’s community benefits from a rich ecossystem of people creating and sharing educational resources and code libraries.
Standard Processing is based on the Java programming language but there are two other projects supported by the Processing Foundation that you might want to try:
- P5*JS (a JavaScript library );
- Processing Python Mode (based on Jython, a Python 2.7 implementation running on the JVM).
Both can be added to the traditional Processing IDE. So let’s see how to install Processing Python Mode (which hopefully is the reason you are reading this).
Installation steps
1. Visit the releases at the Processing site (http://www.processing.org/releases), select Processing 3.5.4 for your OS.
2. There is no installer, you just unzip/extract a folder. This is how it looks on Windows:
On macOS it’s almost the same, and on Linux, you can open a Terminal window, point it to the decompressed downloaded folder and type ./processing (you may also want to execute install.sh and that should create a nice desktop shortcut to Processing)
3. Once the Processing IDE is launched, look for the modes menu on the top right corner and select Add mode…
4. Select the Python Mode on the list and click Install to get it.
[If this fails, see more instructions down below].
5. Check if installation has finished with a green mark and select “Python” at the modes menu!
You might need to close and open again the Processing IDE. A Processing folder will be created under the user’s Documents on Windows and macOS (On Linux the folder is called sketchbook), there you’ll find your sketches (programms), tools, modes and libraries. This is how it looks when you’ve finished:
Notes:
- If you are under some restrictive proxy our without Internet acess you can download PyhtonMode.zip and manualy copy it (on Windows & Mac OS) under Documentos > Processing > modes > PythonMode. On Linux, under your sketchbook folder/material-aulas.
- Firewalls may disturb Python Mode as there is a helper process that tries to connect online.
- Another known issue is working with non-ASCII OS usernames & paths.
How about a sketch to test it?
github.com/villares/py.processing-play
Alexandre B A Villares (abav.lugaralgum.com), CC-BY-NC-SA-4.0 License