Processing.py-Bugs icon indicating copy to clipboard operation
Processing.py-Bugs copied to clipboard

Video library can't find dependent lib on Windows

Open villares opened this issue 5 years ago • 3 comments

I'll try to investigate if this is caused by an unusual location of the Processing/sketchbook folder, but the Java mode video capture example worked fine... (Also working on Python mode on my Linux machine).

add_library('video')    # import processing.video.*
def setup():
    global video
    video = Capture(this, 640, 480)
    video.start()
    # ... actually I could reproduce with just the add_library() line

Error:

UnsatisfiedLinkError: D:\sketchbook_old\libraries\video\library\windows64\libgio-2.0-0.dll: Can't find dependent libraries
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
	at java.lang.Runtime.load0(Runtime.java:809)
	at java.lang.System.load(System.java:1086)
	at jycessing.LibraryImporter.recursivelyLoadNativeLibraries(Unknown Source)
	at jycessing.LibraryImporter.addLibrary(Unknown Source)
	at jycessing.LibraryImporter$1.__call__(Unknown Source)
	at org.python.core.PyObject.__call__(PyObject.java:480)
	at org.python.core.PyObject.__call__(PyObject.java:484)
	at org.python.pycode._pyx11.f$0(sketch_2020_07_30b.pyde:1)
	at org.python.pycode._pyx11.call_function(sketch_2020_07_30b.pyde)
	at org.python.core.PyTableCode.call(PyTableCode.java:171)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.Py.runCode(Py.java:1614)
	at org.python.core.Py.exec(Py.java:1658)
	at org.python.pycode._pyx10.f$0(C:/Users/Lenovo/Desktop/sketch_2020_07_30b/sketch_2020_07_30b.pyde:96)
	at org.python.pycode._pyx10.call_function(C:/Users/Lenovo/Desktop/sketch_2020_07_30b/sketch_2020_07_30b.pyde)
	at org.python.core.PyTableCode.call(PyTableCode.java:171)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.Py.runCode(Py.java:1614)
	at org.python.core.Py.exec(Py.java:1658)
	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:276)
	at jycessing.PAppletJythonDriver.processSketch(Unknown Source)
	at jycessing.PAppletJythonDriver.findSketchMethods(Unknown Source)
	at jycessing.Runner.runSketchBlocking(Unknown Source)
	at jycessing.mode.run.SketchRunner.lambda$startSketch$3(Unknown Source)
	at java.lang.Thread.run(Thread.java:748)

villares avatar Aug 12 '20 13:08 villares

Just tried to figure this one out as well. I wish I had seen your post before. It is definitely only faulty on Windows but not on Mac. Any luck solving the issue? Otherwise, I will have to try the p5 library for Python and some other video library I can find.

Marvinvader avatar Jun 14 '21 15:06 Marvinvader

Hi @Marvinvader,

I know there are some people looking into library loading issues on Python mode (specially on Windows) but I guess they have been slowed down by the pandemic so, this one has no solution yet, unfortunatly.

I have been using a VirtualBox machine with some students, in some cases. I have not tried with the video library but it could also be a desperate move worth a try.

villares avatar Jun 14 '21 19:06 villares

A late comment from my side. I have borrowed a Mac to work around the problem which was only related to the video library on Windows. I also had a quick look into other options for Windows and Python only and Pyglet looked quite promising but I eventually decided to use Processing.py (and get a Mac) as I am more used to it.

Marvinvader avatar Jul 07 '21 11:07 Marvinvader