# Problem using pip to install RTDE

**URL:** <https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589>\
**Category:** SDU ur\_rtde\
**Created:** [May 28, 2021, 4:20am UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589 "2021-05-28T04:20:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon99313579](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@anon99313579](https://forum.universal-robots.com/u/anon99313579)\
**Post date:** [May 28, 2021, 4:20am UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/1 "2021-05-28T04:20:34Z")

</div>

I am currently trying to install the RTDE python package to communicate with UR10e Cobot, but keep getting errors.

 ![Capture](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/a/a98746554a7d02c27fbdd883449b7bbc951f929a.png)

When I type in “pip install --user ur-rtde”, I get errors. I have attached a picture with the error message, as it is too big to fit into a post.

I want to use RTDE to help with received data. I currently have been experimenting with using a socket connection in python and setting digital inputs and outputs. I want to start sending integer variables to the cobot and read received data. I know how to receive data from the cobot using the socket connection, but I don’t understand anything that I receive back from the cobot. It is just a big hex string.

So I have 3 questions:

1. Is there some pre-requisite that I have to do before I try to install this? Is there another way to install this withou pip?
2. Does anyone have any information on how to send integer values using python socket library?
3. Does anyone have any information on how to interpret the data received using the socket.recv(1024) command? The  
received data looks something like  
this:  
b’\x00\x00\x007\x14\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x03\tURControl\x05\x05\x00\x00\x00\x00\x00\x00\x00\x0028-08-2019,  
08:56:36\x00\x00\x00\x18\x14\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x05j\x10\x00\x00\x00/\x00\x00\x00\x00\x01\xbd\

---

<div class="post-metadata">

**Author:** ![mmi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mmi/32/691_2.png) [@mmi](https://forum.universal-robots.com/u/mmi)\
**Post date:** [May 28, 2021, 7:00am UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/2 "2021-05-28T07:00:36Z")

</div>

It looks like this particular library requires cmake that is not installed.  
There is official RTDE library available on [Real-Time Data Exchange (RTDE) Guide - 22229](https://www.universal-robots.com/articles/ur/interface-communication/real-time-data-exchange-rtde-guide/)

---

<div class="post-metadata">

**Author:** ![anpl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/anpl/32/4494_2.png) [@anpl](https://forum.universal-robots.com/u/anpl)\
**Post date:** [May 28, 2021, 10:19am UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/3 "2021-05-28T10:19:06Z")

</div>

Hi Sean

Please ask these questions on the [issue tracker](https://gitlab.com/sdurobotics/ur_rtde/-/issues) related to [ur\_rtde](https://gitlab.com/sdurobotics/ur_rtde). Regarding your specific question, there is currently an issue with pip installation of ur\_rtde on Windows, until I fix this you can try to build it from source.

---

<div class="post-metadata">

**Author:** ![stefan.keller](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@stefan.keller](https://forum.universal-robots.com/u/stefan.keller)\
**Post date:** [January 17, 2022, 12:41pm UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/4 "2022-01-17T12:41:19Z")

</div>

Same Problem here, didn’t find the solution. Cmake is installed though.

---

<div class="post-metadata">

**Author:** ![stefan.keller](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@stefan.keller](https://forum.universal-robots.com/u/stefan.keller)\
**Post date:** [January 20, 2022, 4:52pm UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/5 "2022-01-20T16:52:28Z")

</div>

I need to get this working, I already tried it on different systems/OS like Raspberry Pi and Windows 10.  
I wasn’t able to build it from source [https://sdurobotics.gitlab.io/ur\_rtde/installation/installation.html#commandline-build](https://sdurobotics.gitlab.io/ur_rtde/installation/installation.html#commandline-build) as I didn’t manage to complete the cmake/boost part.

> ‘the source does not appear to contain CMakeLists.txt’

How did you guys get it running? I would like to use it on Win 10 with Python 3.10  
I would love to use an alternative to ur\_rtde but couldn’t find one.

---

<div class="post-metadata">

**Author:** ![cags](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/cags/32/6304_2.png) [@cags](https://forum.universal-robots.com/u/cags)\
**Post date:** [February 2, 2022, 10:02am UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/6 "2022-02-02T10:02:50Z")

</div>

I got it to install it in a Linux Subsystem for Windows, so it runs in a Ubuntu terminal, which is not really Windows, so here is what I did:

1. Enabled WSL from the Control Panel and installed the Ubuntu 20 terminal from Microsoft Store (here’s a [tutorial](https://www.windowscentral.com/install-windows-subsystem-linux-windows-10)).
2. Install Python and update/upgrade some packages that I use often.
3. Install the ur\_rtde package following the Quick Install:

```auto
sudo add-apt-repository ppa:sdurobotics/ur-rtde
sudo apt-get update
sudo apt install librtde librtde-dev

```

I use the WSL for other purposes, but I still did steps 1 and 2. I have a Virtual Machine with Ubuntu 20 that I use for the RTDE, but for this post I tried to run the commands from step 3 on the Ubuntu terminal in Windows and it worked, so I hope you can do it too.

The disadvantage from using the WSL is that it still counts as a separate OS, so sharing files can be tricky. On the other hand, since they are both running on the same machine, they both can access and share data through the internal IP address 127.0.0.1, so you can make server/client functions to send/receive data in separate processes. For example, you can use the terminal to access the RTDE server, get the TCP position from the UR and stream or re-send the data to a data-logger through UDP, TCP, XML-RPC, ROS topics…

In case you like this approach, this is how I work with the WSL:

1. Installed [Visual Code in Windows](https://code.visualstudio.com/docs/?dv=win) and added the Python and [remote-WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl#:~:text=The%20Remote%20%2D%20WSL%20extension%20lets,as%20you%20would%20from%20Windows.) extensions.
2. Use Visual Code to edit programs in Python and run them from the Visual Code terminal.

For the RTDE, I follow this [tutorial](https://www.youtube.com/watch?v=hl89UeCNqkI) for beginners on how to use UR-RTDE on python. I use the VM, but I see no difference between using Visual Code inside a VM with Ubuntu 20 and using Visual Code with a Ubuntu 20 terminal on Windows.

---

<div class="post-metadata">

**Author:** ![stefan.keller](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@stefan.keller](https://forum.universal-robots.com/u/stefan.keller)\
**Post date:** [February 2, 2022, 10:40pm UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/7 "2022-02-02T22:40:01Z")

</div>

And how to set up vscode so it’s running/compiling using the linux subsystem? That’s my last step missing. Will try with a VM later as well.

---

<div class="post-metadata">

**Author:** ![cags](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/cags/32/6304_2.png) [@cags](https://forum.universal-robots.com/u/cags)\
**Post date:** [February 3, 2022, 7:12am UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/8 "2022-02-03T07:12:34Z")

</div>

Once you have installed the Ubuntu terminal and the extension on VCode, you’ll see a new option on the left bar, which is for connecting to the WSL. Then VCode will connect to it and re-open from the WSL directory.  
Afterwards, you can navigate and edit files located in the Linux subsystem. If you open a terminal, it’ll be a Ubuntu terminal, and you can run Linux commands on it.

![wsl_forum](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/6/64289de82f15f3029d6febfa9d00151c94ea81e0.png)

 ![wsl_forum2](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/7/74d9932d1ff281c4c17abb0f1381e9d234068e1c.png)

EDIT: as a final tip, whenever you want to try a VM, I’d go for the [Starter Package](https://plus.universal-robots.com/download-center/urcaps-starter-package/), which is a VM from UR that comes already with URSim installed.

---

<div class="post-metadata">

**Author:** ![stefan.keller](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@stefan.keller](https://forum.universal-robots.com/u/stefan.keller)\
**Post date:** [February 3, 2022, 3:29pm UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/9 "2022-02-03T15:29:02Z")

</div>

Unfortunately it doesn’t find the ur-rtde package, altough it seems to be correctly installed

 ![ur3](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/5/5a8549fd5e20da380ba5791bdba70cc42857e406.png)

how did you set up rtde in the ur vm?

 ![ur2](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/c/caf73fed4574e33e5048f4922591b88afe5e5491.png)

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [May 5, 2022, 1:50pm UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/10 "2022-05-05T13:50:00Z")

</div>

Hello,  
We are using this library but there isn’t possibility to read I/O’s in python via rtde. Do you have any recommendation?

---

<div class="post-metadata">

**Author:** ![anon39864266](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon39864266](https://forum.universal-robots.com/u/anon39864266)\
**Post date:** [July 5, 2022, 7:54am UTC](https://forum.universal-robots.com/t/problem-using-pip-to-install-rtde/14589/11 "2022-07-05T07:54:42Z")

</div>

thanks for sharing the help
