报错一:
错误提示:
Running command: "cmake /home/zzw/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/zzw/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/zzw/catkin_ws/install -G Unix Makefiles" in "/home/zzw/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/zzw/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/noetic -- This workspace overlays: /opt/ros/noetic -- Using PYTHON_EXECUTABLE: /home/zzw/anaconda3/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 "/home/zzw/catkin_ws/build/CMakeFiles/CMakeOutput.log". Invoking "cmake" failed
ubuntu20.04,在catkin_make的时候报错
解决方案:
1、用conda list 看看你有没有安装 empy,没有装的话就要在conda里面安装它,conda install -c conda-forge empy
2、还有个方法就是不用anaconda的Python环境,把.bashrc里面的 export PATH="/home/用户名/anaconda3/bin:$PATH" 注释掉,再source一下
报错二:
错误提示:
ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg' Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH. CMake Error at /opt/ros/noetic/share/catkin/cmake/safe_execute_process.cmake:11 (message): execute_process(/home/zzw/anaconda3/bin/python3 "/opt/ros/noetic/share/catkin/cmake/parse_package_xml.py" "/opt/ros/noetic/share/catkin/cmake/../package.xml" "/home/zzw/catkin_ws/build/catkin/catkin_generated/version/package.cmake") returned error code 1 Call Stack (most recent call first): /opt/ros/noetic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process) /opt/ros/noetic/share/catkin/cmake/all.cmake:168 (_catkin_package_xml) /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:58 (find_package) -- Configuring incomplete, errors occurred! See also "/home/zzw/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/zzw/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed
解决方案:
python3 -m pip install catkin_pkg



