unable to find either executable empy or Python module ‘em‘ try installing the package ‘python3-empy

开始编译一次工作空间,

$ 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’
unable to find either executable empy or Python module ‘em‘ try installing the package ‘python3-empy_第1张图片

2 问题分析
在ubuntu系统中,存在两个python;python2.7和python3.8(注意这两个版本不可删除,否则OS系统瘫痪);又装了一个anaconda后,出现了第三个版本的python3.9.

    因此系统中三个版本python:

python2.7
python3.8
anaconda/lib/bin/python3.9
他们的环境别名是:(/usr/bin中见到的软连接)

            python2、python3,python

    最近的ROS-noetic中,需要用python3,但无法用anaconda内的python3,因此,这里需要选python3.8,别名是python3

3 改进方法
wiki上提到了这个问题:
"对于ROS Melodic和早期版本的Python 3用户:注意,如果你从源代码构建ROS来实现Python 3的兼容性,并适当地设置您的系统(即:安装所有必需的ROS Python包的Python 3版本,例如catkin),

    那么在首次建立工作区后,在这个干净的catkin工作区中的第一次catkin_make命令必须是:

            $ catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3

    这将会配置catkin_make使用Python 3。

参考连接:参考连接

你可能感兴趣的:(python,开发语言)