当前位置: 首页 > 工具软件 > Py++ > 使用案例 >

ROS报错:-- Could NOT find PY_em (missing: PY_EM)

谈琛
2023-12-01

Ubuntu20.04, ROS Noetic,根据ROS tutorial,

ROS/Tutorials - ROS Wiki

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/
$ catkin_make

报错如下,

matthew@UBUT:~/catkin_ws$ catkin_make
...
-- Using PYTHON_EXECUTABLE: /home/matthew/anaconda3/envs/torch/bin/python3
-- Using Debian Python package layout
-- 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'
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 errors with cmake regarding PY_em/PY_EM/empy/em · Issue #2 · ros-melodic-arch/ros-melodic-catkin · GitHub

这是因为catkin找的的python版本为anaconda下面的版本,所以需要改为指定采用下面的命令

catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3

结果就一切正常了。

 类似资料: