Colcon select Python version
Hello, I encountered problems while setting up Github Actions for a ROS2 Humble project on Windows. I used an action for setting up ROS2 since it seemed pretty complicated on Windows which uses Python version 3.7.
The problem is that colcon selects Python version 3.11 and fails with ModuleNotFoundError: No module named 'catkin_pkg'
when building packages.
I tried using -DPYTHON_EXECUTABLE=...
or Pythons`s virtual environments and created an issue at the repository containing the action which contains links to the workflow and logs, does anybody know a way of forcing colcon to use a particular Python version?
Edit: I also tried replacing the actions and doing everything by my self but the error persists.
2023-05-05T14:34:04.6016022Z Starting >>> dotnet_cmake_module
2023-05-05T14:34:04.7077082Z Starting >>> ament_cmake_export_assemblies
2023-05-05T14:34:05.9151305Z Not searching for unused variables given on the command line.
2023-05-05T14:34:05.9152542Z Not searching for unused variables given on the command line.
2023-05-05T14:34:21.1725257Z -- Found ament_cmake_core: 1.3.3 (C:/dev/humble/ros2-windows/share/ament_cmake_core/cmake)
2023-05-05T14:34:21.1726025Z -- Found ament_cmake: 1.3.3 (C:/dev/humble/ros2-windows/share/ament_cmake/cmake)
2023-05-05T14:34:42.3629746Z -- Found Python3: C:/hostedtoolcache/windows/Python/3.11.3/x86/python3.exe (found version "3.11.3") found components: Interpreter
2023-05-05T14:34:42.3630442Z [Processing: ament_cmake_export_assemblies, dotnet_cmake_module]
2023-05-05T14:34:42.3631019Z -- Found Python3: C:/hostedtoolcache/windows/Python/3.11.3/x86/python3.exe (found version "3.11.3") found components: Interpreter
2023-05-05T14:34:42.6704445Z Traceback (most recent call last):
2023-05-05T14:34:42.6705318Z File "C:\dev\humble\ros2-windows\share\ament_cmake_core\cmake\core\package_xml_2_cmake.py", line 22, in <module>
2023-05-05T14:34:42.6705850Z from catkin_pkg.package import parse_package_string
2023-05-05T14:34:42.6706309Z ModuleNotFoundError: No module named 'catkin_pkg'