# Deploy Python program to  XRP

**URL:** <https://xrp.discourse.group/t/deploy-python-program-to-xrp/268>\
**Category:** Python programming\
**Created:** [February 26, 2024, 1:14pm UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268 "2024-02-26T13:14:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrmunoz](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@mrmunoz](https://xrp.discourse.group/u/mrmunoz)\
**Post date:** [February 26, 2024, 1:14pm UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/1 "2024-02-26T13:14:45Z")

</div>

I am following the guide [Deploy Python program to roboRIO — FIRST Robotics Competition documentation](https://docs.wpilib.org/en/stable/docs/software/python/subcommands/deploy.html) to program XRP with Python and when I try to complete the Deploy Python program I get an error that the SSH connection cannot be established, it looks like the port is closed.  
I have checked the firewall and everything is open.

Can anyone help me to Deploy Python program to XRP ?

Thanks

---

<div class="post-metadata">

**Author:** ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)\
**Post date:** [February 26, 2024, 11:01pm UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/2 "2024-02-26T23:01:19Z")

</div>

Are you looking to just use Python on the XRP or are you looking to specifically use the FRC programming model with Python on the XRP? They are two different things and wanted to confirm which direction you are headed in first.

---

<div class="post-metadata">

**Author:** ![stmayhem](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@stmayhem](https://xrp.discourse.group/u/stmayhem)\
**Post date:** [February 28, 2024, 1:26pm UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/3 "2024-02-28T13:26:23Z")

</div>

FWIW, I know that when we’re using Java or C++ with the XRPs, you don’t _deploy_ the code to them; you instead select the option to “Simulate robot code”, since the code isn’t actually running **on the XRP** , but is instead executing on your computer, and communicates via network sockets with a custom shim running on the XRP to translate simulated motor control, sensor readings, etc., back and forth between the XRP and your computer.

I haven’t worked with Python for the XRP (yet), but I’m guessing that this is a similar issue.

---

<div class="post-metadata">

**Author:** ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)\
**Post date:** [February 28, 2024, 8:39pm UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/4 "2024-02-28T20:39:25Z")

</div>

There is a version of micropython that comes on the XRP and runs natively without any simulator. It runs with the IDE at [XRPCode.wpi.edu](https://XRPCode.wpi.edu)

---

<div class="post-metadata">

**Author:** ![rayluo](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/rayluo/32/252_2.png) [@rayluo](https://xrp.discourse.group/u/rayluo)\
**Post date:** [November 18, 2024, 7:30am UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/5 "2024-11-18T07:30:56Z")

</div>

Hi @mrmunoz , I ran into exact same issue. Have you ever figured it out?

---

<div class="post-metadata">

**Author:** ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)\
**Post date:** [November 18, 2024, 6:54pm UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/6 "2024-11-18T18:54:58Z")

</div>

@bradmiller @ZeeQueue Does python work with the WPILib simulator / XRP?

---

<div class="post-metadata">

**Author:** ![ZeeQueue](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/zeequeue/32/35_2.png) [@ZeeQueue](https://xrp.discourse.group/u/ZeeQueue)\
**Post date:** [November 18, 2024, 7:01pm UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/7 "2024-11-18T19:01:58Z")

</div>

RobotPy (as in the Python version that’s usable for FRC)? It should work, since it uses WPILib under the hood. Someone over on ChiefDelphi has some examples written: [https://www.chiefdelphi.com/t/xrp-wpilib-robotpy-examples/474623](https://www.chiefdelphi.com/t/xrp-wpilib-robotpy-examples/474623)

---

<div class="post-metadata">

**Author:** ![ZeeQueue](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/zeequeue/32/35_2.png) [@ZeeQueue](https://xrp.discourse.group/u/ZeeQueue)\
**Post date:** [November 18, 2024, 7:05pm UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/8 "2024-11-18T19:05:03Z")

</div>

Heh, it was actually posted here too: [Some robotpy examples for new team members](https://xrp.discourse.group/t/some-robotpy-examples-for-new-team-members/533)

---

<div class="post-metadata">

**Author:** ![lobrien](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/lobrien/32/235_2.png) [@lobrien](https://xrp.discourse.group/u/lobrien)\
**Post date:** [November 18, 2024, 7:18pm UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/9 "2024-11-18T19:18:33Z")

</div>

That’s my code and I’d be happy to help anyone with the process. Is there a particular problem that you’re having or area where I could clarify things?

---

<div class="post-metadata">

**Author:** ![rayluo](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/rayluo/32/252_2.png) [@rayluo](https://xrp.discourse.group/u/rayluo)\
**Post date:** [November 24, 2024, 7:50am UTC](https://xrp.discourse.group/t/deploy-python-program-to-xrp/268/10 "2024-11-24T07:50:41Z")

</div>

I love this community! Thanks, Fgrossman and ZeeQueue, for getting me help. And thanks, @lobrien , for your documentation provides a command line “robotpy … sim **–xrp** ” which is the missing piece for me.

Also, now a newbie like me has better understanding of the first paragraph of your [“Running XRP programs” documentation](https://github.com/lobrien/xrp_wpilib_examples/blob/master/docs/index.md#running-xrp-programs), and @stmayhem 's earlier answer in this thread. Indeed, XRP’s program needs no “deploy”; it just needs the “python robotpy sim --xrp”. That quirk feels not ideal, as I was originally expecting to use XRP to also get myself familiar with the RoboRIO deployment workflow. Now that seems impossible. But I guess I will live with that.
