Robotpy NAVX returned non-zero exit status 2

We tried to install navx using those commands:

py -3 -m robotpy_installer download-opkg robotpy-navx(On Windows)
py -3 -m robotpy_installer install-pip robotpy-navx (on roborio's network)

but the code that I used in roborio’s network returns non-zero exit status 2.

Here is the full output:

13:49:00:139 INFO : robotpy.installer : RobotPy Installer 2019.2.0
13:49:00:140 INFO : robotpy.installer : -> caching files at C:\Windows\system32
13:49:00:141 INFO : robotpy.installer : Copying over the pip cache…
13:49:00:148 INFO : robotpy.installer : Finding robot for team 7439
13:49:00:160 DEBUG : robotpy.installer : Looking up hostname ‘roboRIO-7439-FRC.local’…
13:49:00:164 DEBUG : robotpy.installer : Looking up hostname ‘roboRIO-7439-FRC’…
13:49:00:165 DEBUG : robotpy.installer : Looking up hostname ‘roboRIO-7439-FRC.lan’…
13:49:00:167 DEBUG : robotpy.installer : Looking up hostname ‘roboRIO-7439-FRC.frc-field.local’…
13:49:00:167 INFO : robotpy.installer : -> Robot is at
13:49:00:168 INFO : robotpy.installer : Connecting to robot via SSH at
Using username “admin”.
NI Linux Real-Time (run mode)

Log in with your NI-Auth credentials.

Remote working directory is /home/admin
local: unable to open C:\Windows\system32\pip_cache\pynetworktables-2020.0.1.tar.gz
13:49:01:989 ERROR : robotpy.installer : Command ‘[‘C:\Users\Maker1\AppData\Local\Programs\Python\Python38\lib\site-packages\robotpy_installer-2019.2.0-py3.8.egg\robotpy_installer\win32\psftp.exe’, ‘-pw’, ‘’, ‘-b’, ‘C:\Users\Maker1\AppData\Local\Temp\tmpse78q6xf’, ‘admin@’]’ returned non-zero exit status 2.

1 Like

I think the second command should be…

py -3 -m robotpy_installer install robotpy-navx

Perhaps try that. I am not sure how you are running the second command, but it too should be in a Windows shell, not in a remote shell (For example Putty connected to the Rio). In general, You should not need to use the remote shell unless you have strange errors or are trying some experimental stuff (Pixy cam for instance)?

~Mr. R^2

Reading this post, a lot of alarm bells are ringing in my head, so this is going to be a longer-than-usual post…

First off:

I’m amazed you managed to get a pip_cache directory in your System32 directory in the first place. This is probably a sign that you ran robotpy-installer as admin… which you should never need to do.

I’m surprised you’ve managed to get permission errors like this though. But at the same time I am not surprised.

Don’t run RobotPy as admin. Run robotpy-installer within a directory you normally have write access to (such as your user profile directory).


So you’re running the 2019 robotpy-installer. This is fine as long as you intend on actually running the 2019 libraries on a 2019 roboRIO image. As long as you’re aware. Which leads to…

This command would’ve failed with RobotPy 2019, as no such opkg package existed last year. robotpy-navx was pure-Python in 2019, so requires a download-pip and install-pip for the 2019 version, and requires an explicit version constraint to grab the 2019 version (otherwise it’ll download the 2020 version):

robotpy-installer download-pip "robotpy-navx<2020"

If you did intend on running the 2020 libraries, then you need to first upgrade robotpy-installer (and probably pyfrc).

This doesn’t match your download command. If you’re running RobotPy 2020, then this should be an install-opkg instead.

1 Like

I deleted my previous post as I was not thinking clearly :).

So, we were able to push code to the robot by doing the following…

py -m robotpy_installer download-opkg robotpy-navx
py -m robotpy_installer install-opkg robotpy-navx --no-version-check

I will update later when we try to run the code.

~Mr. R^2
Edit: we did get Navx working tonight. :smile: Tgis was on robotpy 2020.