ubuntu20.04出现Unable to find either executable ‘empy‘ or Python module ‘em‘... try

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

猜你喜欢

转载自blog.csdn.net/weixin_48319333/article/details/129640885