# ROS常见问题

# 1.catkin_make exception

  • ERROR:
#### Running command: "cmake /media/lx/data/code/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/media/lx/data/code/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/media/lx/data/code/catkin_ws/install -G Unix Makefiles" in "/media/lx/data/code/catkin_ws/build"
####
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /media/lx/data/code/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/lx/catkin_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/lx/catkin_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /media/lx/data/sw/anaconda3/envs/detectron/bin/python3 (found suitable version "3.9.12", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /media/lx/data/sw/anaconda3/envs/detectron/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)


-- Configuring incomplete, errors occurred!
See also "/media/lx/data/code/catkin_ws/build/CMakeFiles/CMakeOutput.log".
Invoking "cmake" failed

  • SOLUTION

catkin may be looking for python version installed in anaconda.
Just run catkin make -DPYTHON_EXECUTABLE=/usr/bin/python3 like it says on the page acxz posted.
Install was able to find python3-empy now and continue.

(adsbygoogle = window.adsbygoogle || []).push({});