ubuntu20.04出现Unable to find either executable ‘empy‘ or Python module ‘em‘… try
问题
在运行catkin_make
命令时出现以下报错
-- 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'... try
installing the package 'python3-empy'
这是因为catkin
找的python版本为anaconda下面的版本,所以需要改为指定采用下面的命令
解决办法
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
因为我的是ubuntu20.04,所以自带python版本是3.x,ubuntu较低版本可能python版本为2.x,故需要将上面命令中的python3
改为python2