如何在 cygwin 中运行 easy_install?

Ale*_*her 32 python cygwin easy-install

我正在尝试在 cygwin 的 python 中安装一些软件包,但出现以下错误:“easy_install: command not found”。

我试图运行“easy_install.py”,结果也是“easy_install.py: command not found”。我试图在整个 cygwin 的 /usr 树中搜索任何以前缀“easy”命名的东西,但没有找到。

我错过了什么吗?AFAIK,easy_install 工具应该是python 2.5 中包含的电池。或者是否有我错过的需要安装的软件包?

its*_*dok 39

在 cygwin 提示符下,执行:

$ wget http://peak.telecommunity.com/dist/ez_setup.py
$ python ez_setup.py
Run Code Online (Sandbox Code Playgroud)

这将在您的 cygwin 上安装 easy_install。

像py一样简单。

  • 加上一个可怕的双关语。 (14认同)

小智 18

easy_install是 setuptools 包的一部分。这个包由 cygwin 提供。要安装它,请重新运行 cygwin setup[...].exe安装程序,然后在包选择步骤中,勾选“Python/python-setuptools”。

easy_install 脚本附有版本号。而不是运行easy_install,运行easy_install-2.7easy_install-3.4(或x.y您安装的任何版本的Python)。


Ale*_*tov 4

Easy Install 是一个与 setuptools 捆绑在一起的 python 模块 (easy_install),可以在此处找到:http://pypi.python.org/pypi/setuptools。您必须自行安装setuptools。

  • 如果您想将其安装到 Windows python 中,请使用cmd shell中的setuptools 安装脚本或使用 MS Windows 安装程序
  • 如果您需要带有 setuptools 的 python 在 cygwin 中工作,则:

    • 使用cygwin自己的python(您可以使用cygwin的setup.exe安装一个)
    • 使用setuptools源