ros2_documentation icon indicating copy to clipboard operation
ros2_documentation copied to clipboard

Windows Binary install instruction doesn't run

Open knmcguire opened this issue 7 months ago • 5 comments

Issue Type

  • [x] 🐛 Bug / Problem
  • [ ] ✏️ Typo / Grammar
  • [ ] 📖 Outdated Content
  • [ ] 🚀 Enhancement

Distribution

Rolling

Description

Hi!

If you install the windows according to the binary install instructions (as in here), running the examples will fail because the prerelease binary zips are build in an environment where the workspace directory is called C:/pixi_ws, so anything that uses a python script to run from the terminal (and that's 'ros2' itself already) will fail due to that (I just get a failed to create process.

After some discussions on discord together with @traversaro we found it's due to the shebang lines on top of the python scripts being hardcoded on a pixi_ws workspace.

Affected Pages/Sections

https://docs.ros.org/en/rolling/Installation/Windows-Install-Binary.html

Screenshots or Examples (if applicable)

No response

Suggested Fix

@traversaro had some notes on how tofix it:

  1. "Add a post-install script to the windows binary archive that just looks for all the Scripts/*-script.py files and fixes the shebang line to be the correct one. This adds a step for the user, but it is probably the easiest option"
  2. "Add a python.exe trampoline executable in the parent folder of the Scripts folder, that just launches the actual python.exe . This does not adds a step for the user, but it is not so easy and it is probably error prone"
  3. "Go back to only support a specific hardcoded install prefix for the pixi env, not a big fan of it but definitely the solution that requires less work"

I think that 1 will be the best approach here as well

Additional Context

No response

knmcguire avatar Apr 27 '25 10:04 knmcguire

Related issue in ros2 repo: https://github.com/ros2/ros2/issues/1675 .

traversaro avatar Apr 27 '25 12:04 traversaro

Also for reference, there is a PR out that should make it much easier to install. https://github.com/ros2/ci/pull/817

knmcguire avatar Aug 12 '25 11:08 knmcguire

At the very least the following line of https://docs.ros.org/en/rolling/Installation/Windows-Install-Binary.html:

Then create a directory to store the installation. Because of Windows path-length limitations, this should be as short as possible. We’ll use C:\pixi_ws for the rest of these instructions.

should be changed to something like

Then create a directory to store the installation. Because of hard-coded paths in the source files, the directory should be exactly C:\pixi_ws. If you use a different path, ROS 2 will not run!

Sorry if I'm a bit annoyed, this issue cost me several hours.

x3e avatar Oct 15 '25 09:10 x3e

Ah yes... I would imagine... I have pushed for the other PR to go through last week but I imagine ROSCon is delaying it now. If that goes through, than the full binary install should be simpler and folder agnostic.

knmcguire avatar Oct 16 '25 15:10 knmcguire

Update! https://github.com/ros2/ci/pull/817 is now merged, which means that the zip folder is now being packaged with the installation script now: https://ci.ros2.org/job/packaging_windows/.

I'll write the new ROS2 doc instructions for rolling now. I also see that the link of where people can find the binaries was not the right location (releases instead of the jenkins location). That is fully on me, sorry! I'll fix that with the new instructions as well.

knmcguire avatar Dec 05 '25 09:12 knmcguire