Unable to find either executable ‘empy‘ or Python module ‘em‘...和Invoking “cmake“ failed

        ubuntu20.04下我先装了ros neotic,然后装了anaconda,后面创建工作空间并编译出现下面错误:

问题一:

(base) fish@asus:~/文档/test_ws$ catkin_make
Base path: /home/fish/文档/test_ws
Source space: /home/fish/文档/test_ws/src
Build space: /home/fish/文档/test_ws/build
Devel space: /home/fish/文档/test_ws/devel
Install space: /home/fish/文档/test_ws/install
Creating symlink "/home/fish/文档/test_ws/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/fish/文档/test_ws/src -DCATKIN_DEVEL_PREFIX=/home/fish/文档/test_ws/devel -DCMAKE_INSTALL_PREFIX=/home/fish/文档/test_ws/install -G Unix Makefiles" in "/home/fish/文档/test_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: /home/fish/文档/test_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Found PythonInterp: /home/fish/anaconda3/bin/python3 (found suitable version "3.10.9", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /home/fish/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/fish/文档/test_ws/build/CMakeFiles/CMakeOutput.log".
Invoking "cmake" failed
(base) fish@asus:~/文档/test_ws$

解决:

pip install empy

参考:

Invoking “cmake“ failed报错解决_我变成了柴犬的博客-CSDN博客今天在弄ROS中遇到这个报错查找的时候有人推荐:pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools但是我试了一下还是报错最后在命令行输入了这个:pipinstallempy意思是我的工作区是空的!!所以要规避一点错误 要安装这个 emmmmm大家可以试一下...https://blog.csdn.net/qq_49627063/article/details/118764080

问题二:

(base) fish@asus:~/文档/test_ws$ catkin_make
Base path: /home/fish/文档/test_ws
Source space: /home/fish/文档/test_ws/src
Build space: /home/fish/文档/test_ws/build
Devel space: /home/fish/文档/test_ws/devel
Install space: /home/fish/文档/test_ws/install
####
#### Running command: "cmake /home/fish/文档/test_ws/src -DCATKIN_DEVEL_PREFIX=/home/fish/文档/test_ws/devel -DCMAKE_INSTALL_PREFIX=/home/fish/文档/test_ws/install -G Unix Makefiles" in "/home/fish/文档/test_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/fish/文档/test_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Using PYTHON_EXECUTABLE: /home/fish/anaconda3/bin/python3
-- Using Debian Python package layout
-- Found PY_em: /home/fish/anaconda3/lib/python3.10/site-packages/em.py  
-- Using empy: /home/fish/anaconda3/lib/python3.10/site-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/fish/文档/test_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /home/fish/anaconda3/bin/python3 (found version "3.10.9") 
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests3
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/fish/anaconda3/bin/python3
  "/opt/ros/noetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/noetic/share/catkin/cmake/../package.xml"
  "/home/fish/文档/test_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/fish/文档/test_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/fish/文档/test_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
(base) fish@asus:~/文档/test_ws$

解决:

$ catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3

参考:

Invoking “cmake“ failed报错_"invoking \"cmake\" failed"_Ashley-Yu的博客-CSDN博客按照wiki.ros.org上的教程安装完,创建ros工作空间,$ catkin_make它就报错了: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'最后就来一句Invoking “https://blog.csdn.net/qq_44920947/article/details/123300367

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值