原因是 cmake 命令是基于 python2 的,如果系统中没有的话则会报错 转链接:在 Ubuntu20.04 上安装 python2 并设置为默认方式_搬砖-工人的博客-CSDN博客_error: no python2文章目录安装 Python2设置默认方式(替代版本)安装 Python2可以到 Python 官网去下载安装包进行安装,也可以直接使用如下命令安装 Python2:sudo apt install python2安装完成后检查 Python 的版本,在这里我安装的 Python版本为 2.7.18:$ python2 -VPython 2.7.18一般 Ubuntu 是自带 python3 版本的:$ python3 -VPython 3.8.5安装完成后我们可以使用如下命令来检查https://blog.csdn.net/My_CSDN_IT/article/details/114323834