Skip to content

colcon build uses wrong version of python #1421

@alonsnir

Description

@alonsnir

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • Humble
  • DDS implementation:
    • Package: rti-connext-dds-6.0.1 Version: 6.0.1.25-1
  • Client library (if applicable):
    • colcon I guess

Steps to reproduce issue

Python set via pyenv 
$ pyenv versions
  system
  3.6.15
  3.8.10
  3.8.15
  3.9.13
* 3.10.11 (set by PYENV_VERSION environment variable)


colcon build
Starting >>> robot_interfaces
--- stderr: robot_interfaces
CMake Error at /opt/ros/humble/share/python_cmake_module/cmake/Modules/FindPythonExtra.cmake:174 (message):
  execute_process(/home/dev/.pyenv/shims/python3.6 -c 'from sysconfig import
  get_config_var;print(get_config_var('SOABI'))') returned error code No such
  file or directory

Call Stack (most recent call first):
  /opt/ros/humble/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:23 (find_package)
  /opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
  /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
  CMakeLists.txt:28 (rosidl_generate_interfaces)


---
Failed   <<< robot_interfaces [3.31s, exited with code 1]

Expected behavior

Actual behavior

Additional information

Initially I was using pipenv, but just in case have switched to the global Python3 version


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions