I want to know if (and how) it is possible to install (or import) a library for the python daemon when deploying an .urcap on the real robot ?
I know that if it’s totaly in Python I just have to include it in the maven folder. But in my case, It’s not that simple, because it need a special installation (it use C and a Makefile).
I’m trying to install the Python Image Library (PIL, or Pillow to manipulate image file, but the question remain for all the others libraries, like numpy, or sklearn.
(To see how we install pillow -> http://pillow.readthedocs.io/en/latest/installation.html )
With pip it’s so easy to install on “normal” computers. But I don’t know how to do that for a urcap.
Can I just install all with a “Magic file” ? Because due to the way we install URcap, I can’t ask user to connect through ssh to install an image library for python. They won’t understand…
And in case it is not possible, how can I generate Image from the UR ?
Thank for your reply
I would not recommend using a custom coded magic file.
Consider placing the library in the resources folder, and copy it to the native Linux system from Java.
Before starting your daemon, check if the file is already there, and if not, copying the necessary libraries to the desired folder.
Have the same problem.
I have a python script to generate plots using matplotlib python library and a daemon to run it. But it’s not working since I guess matplotlib is not installed on the robot.
Is there a way to install matplotlib for the daemon? Copying folder with lib’s files didn’t work for me.
Thanks in advance for any help!
In general you should install self contained libraries with all dependencies. Linux OS on robot is not designed to be a development machine.
I’d recommend to make a backup of robot image, download all you need to run your application (possibly enabling apt repositories), then compare OS image with backup, and repackage everything with your urcap.
Be careful to respect software licenses for packages that you use in your product.
Check this out:
Maybe that helps.