Ubuntu20.04, ROS Noetic,根据ROS tutorial,
$ 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找的的python版本为anaconda下面的版本,所以需要改为指定采用下面的命令
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
结果就一切正常了。