easy_install: 命令未找到

我正在尝试在Ubuntu 18.04上安装MYCROFT,按照这个链接进行操作:LINK
cd ~/
git clone https://github.com/MycroftAI/mycroft-core.git
cd mycroft-core
bash dev_setup.sh

我遇到了这个错误:
sudo: easy_install: command not found

这个错误是因为脚本dev_setup.sh的第168行尝试执行以下内容:
easy_install pip==9.0.1 # force version of pip

我已经安装了:
sudo apt-get install python-setuptools
sudo apt-get install python-pip python-dev build-essential

然而,

easy_install

命令仍然无法识别。有任何想法吗?

更新:

通过在脚本中注释掉那行代码可以让脚本运行。然而,在进行音频测试时出现一个模块错误:语音识别模块丢失


我在干净安装的Ubuntu 18.04 LTS上无法重现您的错误(包括使用--depth=1和不使用)。您是否有与Python相关的PPA? - N0rbert
2easy_installpython-setuptools的一部分。请将apt policy python-setuptools的输出添加到您的问题中。 - Chai T. Rex
5个回答

在Ubuntu 18.04上,我能够通过命令

pip install python-setuptools

安装python-setuptools,并通过完整路径运行easy_install。
python /usr/lib/python2.7/dist-packages/easy_install.py pip

我更喜欢安装PyPI上的pip,而不是安装python-pip系统包,因为pip更新速度比发行版快,所以我选择从PyPI安装。
希望对你有帮助!

非常感谢您的回答!我之前一直很沮丧,因为我使用的是find / -xdev -name easy_install命令,所以无法找到easy_install.py(因为它有.py扩展名)。您可能刚刚帮我避免了尝试某些非常绝望的解决方案。 - chris
不客气!当find没有返回任何结果时,我通常会使用一个备选方案,即使用更模糊的搜索方式,比如:find / -iname '*easy_install*'。这将返回文件名中包含不区分大小写的easy_install的文件;即使它前缀或后缀有其他内容也可以找到。 - berto
2比这个更简单的方法是运行 python -m easy_install pip - taxilian

根据changelog的记录,easy_install已从python-setuptools软件包中移除。
很抱歉没有好消息告诉你,我没有找到解决方案,除非更新旧脚本以使用pip(并希望pip安装的版本可用)。
在你的情况下,你想从easy_install获取pip,所以你可以省略这行代码,因为bionic中的pip版本是9.0.1-2。对脚本进行更好的修改可能是在尝试通过easy_install安装替代版本之前,检查pip --version是否小于9.0.1

哈哈,对于那些在加载提供.egg文件的第三方库时遇到困难的人来说,真是好笑!还提供了那些与你的系统“不兼容”的.whl文件! - undefined


1这是绝对不能接受的。https://askubuntu.com/a/802594/868497 - zabop

在Ubuntu 18.04上,我多次遇到了同样的错误,我在许多链接上进行了搜索,但没有找到有用的解决方案。
为此,pip的版本应小于或等于9.0.1。
首先,从以下位置安装适用于Python 3的pip。
sudo apt install python3-pip

检查pip版本-
pip --version

安装完后,我们需要为python-dev安装build-essential。
sudo apt-get install build-essential python-dev

和Python安装工具
sudo apt-get install python-setuptools

最后,我们可以通过以下命令来安装pymongo。
python -m pip install pymongo

它对我有效,也许对你也有效。

这对我有用,但是我使用了sudo apt install python-pip而不是安装python 3。 - Lamya Elmorsy

easy_install不是Python安装工具的一部分,所以您可以使用pip3来安装Python模块。如果找不到pip,以下方法应该解决您的问题。
sudo apt-get update

sudo apt-get upgrade

sudo apt-get install python3-pip