ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

No module named "ament_package" found

asked 2020-07-27 18:50:52 -0600

flynneva gravatar image

while running colcon build on a windows 10 machine with foxy installed...I am getting an error saying that python cant find ament_package. any ideas on how to fix this would be greatly appreciated!

D:\code\ros\foxy>colcon build
Starting >>> udp_com
--- stderr: udp_com
Traceback (most recent call last):
  File "C:/dev/ros2_foxy/share/ament_cmake_core/cmake/package_templates/", line 21, in <module>
  from ament_package.templates import get_environment_hook_template_path
ModuleNotFoundError: No module named 'ament_package'
CMake Error at C:/dev/ros2_foxy/share/ament_cmake_core/cmake/ament_cmake_package_templates-extras.cmake:41 (message):
  returned error code 1
Call Stack (most recent call first):
  C:/dev/ros2_foxy/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake:41 (include)
  C:/dev/ros2_foxy/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake:15 (find_package)
  C:/dev/ros2_foxy/share/ament_cmake/cmake/ament_cmakeConfig.cmake:41 (include)
  CMakeLists.txt:14 (find_package)

Failed   <<< udp_com [0.36s, exited with code 1]

Summary: 0 packages finished [0.64s]
  1 package failed: udp_com
  1 package had stderr output: udp_com
  1 package not processed
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-07-28 09:54:31 -0600

flynneva gravatar image

went back and redid all the installation steps and checked env vars.....fixed my problem!

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2020-07-27 18:50:52 -0600

Seen: 2,750 times

Last updated: Jul 28 '20