D.0417
D.0417

Reputation: 13

catkin build fails to compile

I am trying to compile a build file for a sample tutorial in ROS packages. The following shows up in the Terminal,

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)

It appears that it is trying to access the python compiler in an anaconda3 folder but I have it uninstalled recently. Any ideas how I could modify the files so that it points to /usr/bin python ? Any ideas are appreciated. Thank you very much!

Upvotes: 1

Views: 5809

Answers (2)

Tik0
Tik0

Reputation: 2699

So there are two possibilities that your environment is tainted

  1. Your PATH variable is still tainted by pointing to your anaconda location. See this question for reference and remove the anaconda entry. Don't forget to open a new terminal to apply the changes
  2. You've created the local catkin workspace while you've sourced the anaconda environment. Thus, you just need to delete build and devel in your current workspace and just rebuild everything from scratch.

Processing both steps one after another should fix the problem.

Upvotes: 2

akshayk07
akshayk07

Reputation: 2190

Just resolved it recently, I have executed catkin clean before catkin build.

Upvotes: 1

Related Questions