using Processing libraries in py5 #79
Replies: 1 comment 3 replies
-
Welcome, @Maltiec ! I'm very happy to hear you are using py5 in your class. Someday I'd love to see your student's projects. For me it is a thrill to see what people are doing with py5, and I wish more people would show me their work. If you are on twitter, use the hashtag Can I have more information about why you are restarting the kernel before starting a sketch? Which kernel are you using? There are several options available to you for adding jars to use in a py5 Sketch. First, you can use py5_tools.add_classpath() or py5_tools.add_jars(). These must be used before importing py5. This isn't useful if you are using the py5 kernel because it will import py5 for you, before you get a chance to use either of those functions. I suspect this is the issue you are dealing with. Alternatively, you can put jars in a directory called "jars" that is a subdirectory of the current working directory ( You can also add jars to the The next version of py5 (due out in May) responds to a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! First of all many thanks to the author of py5 library! I'm using it instead of classic Processing Python mode in my course on Generative art and it is really helpful. Now, I've tried to use Processing libs, followed the instructions on Camera3D, it worked, but I am using Anaconda-Spyder toolchain, and it is really awful to restart kernel everytime before starting sketch. So I've just moved libraries to my conda env's folder (in my case it is: home/evgeniy/anaconda3/envs/py5coding/lib/python3.8/site-packages/py5/jars/) and it seems to work fine for now. The only trick is that sometimes library name is not the same as the name of .jar file, and it can lead to a problem. For example to use VideoExport library you need to write:
from com.hamoid import VideoExport
Hope it will help somebody.)
Beta Was this translation helpful? Give feedback.
All reactions