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 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM