catkin版本无法编译

时间:2018-07-02 11:04:50

标签: ros catkin

我正在尝试为ROS软件包中的示例教程编译构建文件。以下显示在终端机中,

Errors     << catkin_tools_prebuild:cmake /home/comet/mybot_ws/logs/catkin_tools_prebuild/build.cmake.009.log
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/home/comet/anaconda3/bin/python
  "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/kinetic/share/catkin/cmake/../package.xml"
  "/home/comet/mybot_ws/build/catkin_tools_prebuild/catkin/catkin_generated/version/package.cmake")
  returned error code No such file or directory
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process)
  /opt/ros/kinetic/share/catkin/cmake/all.cmake:151 (_catkin_package_xml)
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:4 (find_package)

似乎它正在尝试访问anaconda3文件夹中的python编译器,但最近将其卸载了。有什么想法可以修改文件,使其指向/ usr / bin python吗?任何想法表示赞赏。非常感谢你!

2 个答案:

答案 0 :(得分:1)

最近才解决它,我在catkin clean之前执行了catkin build

答案 1 :(得分:1)

所以您的环境受到污染的可能性有两种

  1. 通过指向您的蟒蛇位置,您的PATH变量仍然受到污染。请参阅this question以获取参考并删除anaconda条目。不要忘记打开新终端以应用更改
  2. 在获取anaconda环境的同时,您已经创建了本地catkin工作区。因此,您只需要删除当前工作区中的builddevel,然后从头开始重建所有内容即可。

一个接一个地处理两个步骤应该可以解决问题。