本文主要是介绍ros使用catkin_make编译报错Could NOT find PY_em (missing: PY_EM),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
-- Could NOT find PY_em (missing: PY_EM)
CMake Error at /opt/ros/noetic/share/catkin/cmake/empy.cmake:30 (message):Unable to find either executable 'empy' or Python module 'em'... tryinstalling the package 'python3-empy'
Call Stack (most recent call first):/opt/ros/noetic/share/catkin/cmake/all.cmake:164 (include)/opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)CMakeLists.txt:58 (find_package)
解决办法:
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
原因分析
在ubuntu系统中,存在两个python;python2.7和python3.8(注意这两个版本不可删除,否则OS系统瘫痪);又装了一个anaconda后,出现了第三个版本的python3.9.
因此系统中三个版本python:
python2.7
python3.8
anaconda/lib/bin/python3.9
他们的环境别名是:(/usr/bin中见到的软连接)
python2、python3,python
最近的ROS-noetic中,需要用python3,但无法用anaconda内的python3,因此,这里需要选python3.8,别名是python3
参考:https://blog.csdn.net/weixin_48345177/article/details/130136718
这篇关于ros使用catkin_make编译报错Could NOT find PY_em (missing: PY_EM)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!