Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add py5, a Python Processing library #479

Closed
sawula opened this issue Jun 22, 2021 · 2 comments
Closed

Add py5, a Python Processing library #479

sawula opened this issue Jun 22, 2021 · 2 comments
Labels
Enhancement An improvement to something or creating something new.

Comments

@sawula
Copy link

sawula commented Jun 22, 2021

py5 is a new library (currently in beta) for using the Python flavor of Processing. It currently runs in desktop Jupyter notebooks and in mybinder containers. Looking to run in JupyterHub for teaching. Processing's roots are in creative coding, but also education and data visualization. It's reasonable to try include Processing in some introductory data science lessons. I used another Python version of Processing in the classroom (which ran in the Processing IDE ), but always hoped that a library such as this would come about. I'd like to put it through its paces with some students with whom I'm working this summer.

@sawula sawula added the Enhancement An improvement to something or creating something new. label Jun 22, 2021
@sawula sawula changed the title Please add py5, a Python Processing library Add py5, a Python Processing library Jun 22, 2021
@hx2A
Copy link

hx2A commented Jun 23, 2021

Hello, I am the creator of py5, and I am chiming in to provide some additional information to help you with this.

py5 is different from other libraries in that it provides most of its functionality by leveraging Processing's Java libraries. It uses jpype as a Java-Python bridge. To get py5 to work in JupyterHub it will need a JVM (specifically, Java 11).

In addition, Processing requires a display of some kind, and for JupyterHub, this should be a virtual frame buffer.

I have py5 working with mybinder in the py5examples repo. You can see in the binder directory the extra stuff I had to do to get it to work. There are additional linux packages that need to be installed for the virtual frame buffer, for Java, and some other stuff for OpenGL. And something needs to start the virtual frame buffer and set a proper DISPLAY environment variable. If those two requirements are met, py5 will work just like any other Python library.

Here is some useful documentation about running Processing without a real display:

https://github.com/processing/processing/wiki/Running-without-a-Display

Let me know if there is anything I can do to help.

@yuvipanda
Copy link
Member

yuvipanda commented Jul 6, 2021

It's all set up via github.com/2i2c-org/peddie-image now. Thanks to @hx2A for pointing to the example - the image is a fork of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An improvement to something or creating something new.
Projects
None yet
Development

No branches or pull requests

3 participants