# Updating ROS with cpython compile error due to Numpy

**URL:** <https://forum.hello-robot.com/t/updating-ros-with-cpython-compile-error-due-to-numpy/1472>\
**Category:** Ask\
**Created:** [March 5, 2026, 2:29am UTC](https://forum.hello-robot.com/t/updating-ros-with-cpython-compile-error-due-to-numpy/1472 "2026-03-05T02:29:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Tan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/tom_tan/32/1131_2.png) [@Tom\_Tan](https://forum.hello-robot.com/u/Tom_Tan)\
**Post date:** [March 5, 2026, 2:29am UTC](https://forum.hello-robot.com/t/updating-ros-with-cpython-compile-error-due-to-numpy/1472/1 "2026-03-05T02:29:58Z")

</div>

Hello, I am trying to update my ros workspace following this [Updating your ROS Workspace - Stretch Docs](https://docs.hello-robot.com/0.3/installation/ros_workspace/) . My Ubuntu is 22.04 LTS, and ROS is humble.

After running the ./stretch\_update\_ros\_workspace.sh for a while, the updating terminated with the following message:

```bash
INFO: compile options: '-I/home/hcal/ament_ws/src/stretch_ros2/stretch_funmap/.venv/include -I/usr/include/python3.10 -c'
INFO: x86_64-linux-gnu-gcc: /home/hcal/ament_ws/src/stretch_ros2/stretch_funmap/stretch_funmap/cython_min_cost_path.c

/home/hcal/ament_ws/src/stretch_ros2/stretch_funmap/stretch_funmap/cython_min_cost_path.c:1257:10: fatal error: numpy/arrayobject.h: No such file or directory
1257 | #include "numpy/arrayobject.h"
     | ^ ~~~~~~~~~~~~~~~~~~~~
compilation terminated.

error: Command "x86_64-linux-gnu-gcc \
 -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall \
 -g -fstack-protector-strong -Wformat -Werror=format-security \
 -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security \
 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC \
 -I/home/hcal/ament_ws/src/stretch_ros2/stretch_funmap/.venv/include \
 -I/usr/include/python3.10 \
 -c /home/hcal/ament_ws/src/stretch_ros2/stretch_funmap/stretch_funmap/cython_min_cost_path.c \
 -o /home/hcal/ament_ws/src/stretch_ros2/stretch_funmap/tmpvxr9zwz1/home/hcal/ament_ws/src/stretch_ros2/stretch_funmap/stretch_funmap/cython_min_cost_path.o" failed with exit status 1

```

I am using the latest file from [GitHub - hello-robot/stretch\_install: Install scripts for the Stretch mobile manipulators from Hello Robot Inc. · GitHub](https://github.com/hello-robot/stretch_install). Can anyone check this problem?

Thank you so much!

---

<div class="post-metadata">

**Author:** ![shehab](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/shehab/32/936_2.png) [@shehab](https://forum.hello-robot.com/u/shehab)\
**Post date:** [March 5, 2026, 3:11pm UTC](https://forum.hello-robot.com/t/updating-ros-with-cpython-compile-error-due-to-numpy/1472/2 "2026-03-05T15:11:23Z")

</div>

Hey @Tom_Tan, thanks for your post!

Could you please share your `pip list | grep numpy`?

Also, if you run `pip install -U numpy` and rebuild, does it complete the build?

Best,  
Shehab

---

<div class="post-metadata">

**Author:** ![Tom\_Tan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/tom_tan/32/1131_2.png) [@Tom\_Tan](https://forum.hello-robot.com/u/Tom_Tan)\
**Post date:** [March 5, 2026, 5:14pm UTC](https://forum.hello-robot.com/t/updating-ros-with-cpython-compile-error-due-to-numpy/1472/3 "2026-03-05T17:14:02Z")

</div>

```auto
pip list | grep numpy
numpy 2.2.6
numpy-stl 3.2.0

```

This is my result.

At the beginning of the build, the shell displays "Downgrade to numpy 1.26.4…  
". To my understanding, numpy version of system python should be 1.26.4. Is it right?

---

<div class="post-metadata">

**Author:** ![shehab](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/shehab/32/936_2.png) [@shehab](https://forum.hello-robot.com/u/shehab)\
**Post date:** [March 5, 2026, 5:35pm UTC](https://forum.hello-robot.com/t/updating-ros-with-cpython-compile-error-due-to-numpy/1472/4 "2026-03-05T17:35:28Z")

</div>

Ah, if that is the case, please do `pip install numpy==1.26.4`!

Also, are you running this on a robot, or an Ubuntu machine that is not a robot? Thanks for clarifying!

---

<div class="post-metadata">

**Author:** ![Tom\_Tan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/tom_tan/32/1131_2.png) [@Tom\_Tan](https://forum.hello-robot.com/u/Tom_Tan)\
**Post date:** [March 5, 2026, 5:43pm UTC](https://forum.hello-robot.com/t/updating-ros-with-cpython-compile-error-due-to-numpy/1472/5 "2026-03-05T17:43:07Z")

</div>

I am running this on a robot to update stretch\_ros

---

<div class="post-metadata">

**Author:** ![Tom\_Tan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/tom_tan/32/1131_2.png) [@Tom\_Tan](https://forum.hello-robot.com/u/Tom_Tan)\
**Post date:** [March 5, 2026, 5:58pm UTC](https://forum.hello-robot.com/t/updating-ros-with-cpython-compile-error-due-to-numpy/1472/6 "2026-03-05T17:58:37Z")

</div>

Here is a followup. I have successfully updated the ros by following this [Cythonize command fails to find numpy/arrayobject.h · Issue #92 · hello-robot/stretch\_install · GitHub](https://github.com/hello-robot/stretch_install/issues/92)

---

<div class="post-metadata">

**Author:** ![shehab](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/shehab/32/936_2.png) [@shehab](https://forum.hello-robot.com/u/shehab)\
**Post date:** [March 5, 2026, 6:07pm UTC](https://forum.hello-robot.com/t/updating-ros-with-cpython-compile-error-due-to-numpy/1472/7 "2026-03-05T18:07:16Z")

</div>

Thank you for the link! I’m glad you were able to resolve it!
