# New Python Processing project: Py5

**URL:** https://discourse.processing.org/t/new-python-processing-project-py5/30837
**Category:** Processing.py
**Created:** [June 21, 2021, 11:08am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837 "2021-06-21T11:08:58Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)
#### Post date: [June 21, 2021, 11:08am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/1 "2021-06-21T11:08:58Z")

</div>

I’ve been experimenting with [py5](http://py5.ixora.io/). It’s a creative coding framework for Python 3.8 and up – a Python version of Processing – and potentially a new engine for Python Mode in the Processing IDE. Internally, py5 employs Processing’s core libraries via [JPype](https://github.com/jpype-project/jpype).

I spent the weekend experimenting with py5 coupled with [Thonny](https://thonny.org/) (for an IDE/editor). If anybody is keen to know more, I wrote a post on this: [https://tabreturn.github.io/code/python/thonny/2021/06/21/thonny\_and\_py5.html](https://tabreturn.github.io/code/python/thonny/2021/06/21/thonny_and_py5.html)

 ![banner](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/12b975ca3e647228b790f264ff757bbdf1a97c64.png)

---

<div class="post-metadata">

### Author: ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)
#### Post date: [June 21, 2021, 1:27pm UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/2 "2021-06-21T13:27:08Z")

</div>

I’ll definitely give this a go, it might be worth trying out with [graal](https://github.com/oracle/graal) I found significant performance improvements with my [ruby-processing](http://monkstone.github.io/jruby_art/update/2020/10/25/GraalVM.html) projects. The big plus for me is ability to use numpy etc, which was available in [pyprocessing](https://github.com/monkstone/pyprocessing-experiments) but performance was not great.

---

<div class="post-metadata">

### Author: ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)
#### Post date: [June 21, 2021, 7:27pm UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/3 "2021-06-21T19:27:26Z")

</div>

For me setup was dead simple on my linux box

```bash
pip install py5

```

I then added `~/.local/bin` to my path  
Then I used vim to create the [quick example](http://py5.ixora.io/install/) and ran it from vim with

```bash
:!python3 %

```

 ![test](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/17a6ad930f64bf31d76d75a2f9ba5e49fc25ac92.png). That was using the ibm jdk java-14. More fun to follow…

---

<div class="post-metadata">

### Author: ![bryan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/bryan/32/2538_2.png) [@bryan](https://discourse.processing.org/u/bryan)
#### Post date: [June 22, 2021, 1:19am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/4 "2021-06-22T01:19:55Z")

</div>

Hi! i want to try this version too, I’m running ubuntu 21.04 (i’m new into linux), and i only installed `pip3 install py5`. Running the test example with the command `python3 test.py` it gives me the following error

 ![py5q](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/255aa018f5f3415537ef50beeb5ff0e4be7f7043.png)  
Is something related with the

> [@monkstone](#):
>
> I then added `~/.local/bin` to my path  
> Then I used vim to create the [quick example](http://py5.ixora.io/install/) and ran it from vim with this step, right?
> 
> ```auto
> :!python3 %
> 
> ```

---

<div class="post-metadata">

### Author: ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)
#### Post date: [June 22, 2021, 1:27am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/5 "2021-06-22T01:27:08Z")

</div>

Which version of Python are you using?  
`python3 --version`

---

<div class="post-metadata">

### Author: ![bryan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/bryan/32/2538_2.png) [@bryan](https://discourse.processing.org/u/bryan)
#### Post date: [June 22, 2021, 2:37am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/6 "2021-06-22T02:37:32Z")

</div>

Hi! currently v.3.9.5

---

<div class="post-metadata">

### Author: ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)
#### Post date: [June 22, 2021, 3:09am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/7 "2021-06-22T03:09:41Z")

</div>

I’m on Mint (Ubuntu-based). Maybe try a different version of Java –

I created a new directory:

```nohighlight
mkdir <directory name>
cd <directory name>

```

And within that a virtual environment for py5:

```nohighlight
apt-get install python3.9-dev python3.9-venv 
python3.9 -m venv env
source env/bin/activate
pip install py5

```

**`python --version`**

```nohighlight
Python 3.9.5

```

Then I downloaded and setup an alternative version of JDK:

```nohighlight
wget https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gz
tar -xzvf openjdk-11+28_linux-x64_bin.tar.gz
export JAVA_HOME=$PWD/jdk-11/

```

**`jdk-11/bin/java --version`**

```nohighlight
openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

```

Made a quick sketch (the [Quick Example](http://py5.ixora.io/install/#quick-example)), saved it in my new directory, and tested it (`python quick_example.py`)

Runs fine for me.

---

<div class="post-metadata">

### Author: ![bryan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/bryan/32/2538_2.png) [@bryan](https://discourse.processing.org/u/bryan)
#### Post date: [June 22, 2021, 4:18am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/8 "2021-06-22T04:18:41Z")

</div>

Thanks! i follow your steps and it worked just fine!. I want to collaborate in this project, but as you can see, I struggled to make this worked. Can you give an advice about my setup to work with the source code, and how I should approach this? And thanks again 🙂

---

<div class="post-metadata">

### Author: ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)
#### Post date: [June 22, 2021, 4:43am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/9 "2021-06-22T04:43:21Z")

</div>

From [http://py5.ixora.io/help/](http://py5.ixora.io/help/) –

_Right now, the most important thing I need is for people to try py5 and provide feedback._

– so, you can start with that right away! You can [log issues](https://github.com/hx2A/py5generator/issues) and get involved in [discussions](https://github.com/hx2A/py5generator/discussions) on the project’s GitHub pages.

For help with py5 sketches, I think it’s okay to post questions here on [discourse.processing.org](http://discourse.processing.org). The admins can even set up a separate _py5_ category if things grow unwieldy (there’s already one for p5py).

**Code Contributions**

More from [http://py5.ixora.io/help/](http://py5.ixora.io/help/) –

_It would also be great if someone was willing to help write tutorials and example code. Right now, that area of the documentation is seriously lacking. I could also use help with the Windows and OSX specific GUI problems listed on Github. In particular, the [Special Notes for Mac Users](http://py5.ixora.io/tutorials/mac-users/) describes numerous problems with Mac computers. I do all of my development work on Linux and know very little about platform-specific GUI programming. All of the bugs I’d like help with are listed on Github with the [help wanted](https://github.com/hx2A/py5generator/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) tag._

To help out here, you’ll need to familiarise yourself with the workings of GitHub first:

https://www.youtube.com/embed/BCQHnlnPusY?feature=oembed&wmode=opaque&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV

- If you’re contributing to documentation, it’s this repo: [https://github.com/hx2A/py5website](https://github.com/hx2A/py5website)  
- For the py5 source, it’s this repo: [https://github.com/hx2A/py5generator](https://github.com/hx2A/py5generator)  
- Build process - [http://py5.ixora.io/tutorials/build-process/](http://py5.ixora.io/tutorials/build-process/)

I’m not familiar enough with the project’s source code to provide any further advice about modifying it.

---

<div class="post-metadata">

### Author: ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)
#### Post date: [June 22, 2021, 5:53am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/10 "2021-06-22T05:53:52Z")

</div>

On debian systems I generally use `update-alternatives` tool to control which jvm I’m using, and on Archlinux there’s `archlinux-java`, both super convenient when experimenting with different jvms. In fact I find `update-alternatives` super convenient in my ruby-processing projects for selecting different versions of `jruby` etc, mind you I never got on with `rvm` (favoured by many rubyists) which futzes with your system.

---

<div class="post-metadata">

### Author: ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)
#### Post date: [June 22, 2021, 7:27am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/11 "2021-06-22T07:27:40Z")

</div>

Also works for me on RaspberryPI4 (ManjaroArm [64 bit]). However stock manjaroarm distribution python does not come with `wheel`, which is required for build.

```bash
sudo pip install wheel

```

Further you have to be super-patient if you’ve only got 4G ram, I presume that is something to do with pypy being a memory hog. The Quick Example runs fine from vim.

---

<div class="post-metadata">

### Author: ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)
#### Post date: [June 22, 2021, 9:26am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/12 "2021-06-22T09:26:40Z")

</div>

Using the [newton fractal sketch](https://discourse.processing.org/t/a-more-complicated-py5-sketch/30848) as a test java-16-openjdk actually slightly out performed java-11-graalvm though the difference was not significant.

---

<div class="post-metadata">

### Author: ![dlewin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dlewin/32/11691_2.png) [@dlewin](https://discourse.processing.org/u/dlewin)
#### Post date: [June 25, 2021, 8:17am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837/13 "2021-06-25T08:17:40Z")

</div>

hi @tabreturn , just for corrections: you should change the link to your post to :  
[this one](https://tabreturn.github.io/code/python/thonny/2021/06/21/thonny_and_py5.html)
