Universal Robots Forum

Server XMLRPC - LocalMachine - Python 3

I wrote the python 3 code for a XMLRPC server that is meant to run locally on the robot machine.
The server register some functions that need libraries such as numpy or scypy.
I noticed that in the robot machine we have not python 3 but python 2, which is about to be deprecated.

Is it possible to install the version 3 of python in UR robots?
In case it is not possible do you think that rewriting my project using python 2, creating a virtual environment containing all the extra modules(numpy and scypy for python 2.7), and moving it to the robot machine will work?

Thanks in advance

I’ve had a bit of a mixed bag installing python 3 on the robots running debian 8.9 (jessie).

It should be possible but one thing to think about is the limited storage on the robot. Usually in the hundreds of MB.

We’ve basically just been compiling our python3 scripts into 32 bit executables which also protects our scripts.

1 Like

Thank you very much Terry,

Yesterday I tried to compile a py with pyinstaller from the VMs for simulating UR cobots available on the download page of UR.
Unfortunately even with those VMs I am not capable of setting up a proper python env with all the extra modules i need.

I am now downloading a 32 bit ubuntu 16.04.6 Image disk to create a VM from scratch with a proper python env.
I will then compile from there with pyinstaller.

Do you think this will be a proper setup for building executables meant to be ran on the cobots machine?

I am also downloading an image of debian jessie 32-bit in case previous discussed setup is not correct.

We started with the 32 bit UR sim VM and just installed installed python 3 and pip3 to only install the python 3 packages. This worked for a long time until we wanted access to the polyscope 5 sim, at which point we just created a new 16.04 32 bit VM and installed everything from scratch again including the 5 linux sim from the downloads page.

We only had to do that because the newest sim VM and URCap VM are 64 bit. Getting 32 bit python onto the 64 bit VM was a total no go hence our new 32 bit VM.

pyinstaller has worked pretty well, we’ve had to do some advanced stuff to get a few packages to build properly but so far so good.