Robotics StackExchange | Archived questions

Install humble from source: Problem rclpy and pybind11

Hello ROS-Community, I tried to install ROS 2 Humble from source on Ubuntu 20.04. I did it like described in this instruction: docs.ros.org

Everything worked fine until I tried to build the code

colcon build --symlink-install

It installed over 150 pkgs and then it failed at rclpy with this error:

--- stderr: rclpy                                                    
CMake Error in CMakeLists.txt:
  Imported target "pybind11::embed" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in CMakeLists.txt:
  Imported target "pybind11::embed" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Generate step failed.  Build files cannot be regenerated correctly.
---

What did I do wrong? Thank you for your help.

Asked by andy522 on 2023-05-17 04:13:09 UTC

Comments

i see the same failures. I have not been able to find any information about how to successfully build this from source with Ubuntu 20.04. Does anyone have pointers on how to get this built successfully? Thanks,

Asked by boba on 2023-05-18 01:33:04 UTC

Answers

That is because of version of python. Try following to change default to python3

$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 0

Asked by Kamegawa on 2023-06-28 00:09:34 UTC

Comments