catkin_make ,当我尝试在 ubuntu 18 中创建时显示错误

时间:2021-06-15 09:48:41

标签: ros

ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg'
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.
CMake Error at /opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python3
  "/opt/ros/melodic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/melodic/share/catkin/cmake/../package.xml"
  "/home/akash/catkin_ws/build/catkin/catkin_generated/version/package.cmake")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process)
  /opt/ros/melodic/share/catkin/cmake/all.cmake:168 (_catkin_package_xml)
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:58 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/akash/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/akash/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:320: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

这是我遇到的错误,我对 ros 很陌生。我什至不知道如何描述这个错误。

1 个答案:

答案 0 :(得分:0)

我想出了答案。我的理解是catkin_make应该能够访问python3。所以我尝试使用

安装 catkin_pkg
pip install catkin_pkg.

但是我得到了一个错误

pip not found but can be installed with sudo

然后我使用

安装了python 3 pip
 sudo apt install python3-pip

然后我可以在终端中安装 pip。所以我使用

安装了 catkin_pkg
pip3 install catkin_pkg

所以当我尝试运行 catkin_make 时,它​​运行成功。

但我不知道这一切是如何神奇地运作的,谁能解释一下

相关问题