catkin与python的兼容问题

CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/home/wu/anaconda3/bin/python
  "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/kinetic/share/catkin/cmake/../package.xml"
  "/home/wu/ros_catkin/build/catkin/catkin_generated/version/package.cmake")
  returned error code 1
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:52 (find_package)

  在catkin_make的时候发生这种错,和明显和anaconda发生了冲突,anaconda将默认的pyhon版本改变了,导致了catkin_make发生了错误。

解决方法

   检查一下Python的版本: ~$ python -V
  检查一下catkin依赖的Python版本: ~$ dpkg -L python-catkin-pkg
如果Python的版本和catkin依赖的版本不一样,说明Python依赖包有问题,解决办法:

conda install setuptools  
  
pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools 

 

posted @ 2018-04-12 10:08  工大教务处  阅读(6049)  评论(0)    收藏  举报