【问题标题】:Installing pip using python interpreter使用 python 解释器安装 pip
【发布时间】:2012-05-12 21:49:42
【问题描述】:

我对 Python 的内部工作原理相当陌生。

我一直在尝试解决这里看到的错误, Scrapy on Windows XP ImportError: No module named w3lib.html

我安装了 easy_install,所以我可以重新安装 Scrapy,但我无法让它做任何事情。我可以导入easy_install,但我希望能够运行类似的东西 easy_install /my_downloads/OtherPackage-3.2.1-py2.3.​​egg 或 轻松安装http://example.com/path/to/MyPackage-1.2.3.tgz 安装其中一个依赖项,但显然我做错了。

我也不知道如何从这里安装 pip http://www.pip-installer.org/en/latest/installing.html#using-the-installer

我想我的问题是如何运行如下命令? $ 卷曲https://raw.github.com/pypa/pip/master/contrib/get-pip.py |蟒蛇

我正在使用最新的免费 enthought 包,我认为 pylab 界面或 python.exe 可以让我运行此命令。我想我只是在寻找有关如何使用解释器并安装所需软件包来解决原始问题的链接或纲要。

感谢您的帮助

【问题讨论】:

标签: python pip scrapy easy-install


【解决方案1】:

要获得easy_install,您需要使用此处提供的可执行安装程序为Windows 安装setuptoolshttp://pypi.python.org/pypi/setuptools

例如,如果您在 32 位 Windows 上运行 Python 2.7,则安装程序将是: setuptools-0.6c11.win32-py2.7.exe.

这将安装setuptools,它将easy_install.exe 放在您的C:\Python27\Scripts 目录中。

安装后,您可以安装 pip(或 PyPI 中的 任何 包),如下所示:

C:\Python27\Scripts\easy_install pip

【讨论】:

    【解决方案2】:

    首先使用适用于 Windows 的 official Python installer 安装 Python。接下来,下载并安装setuptool for windows,最后是pip for windows

    完成后,您可以使用pip install scrapy 安装scrapy。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-29
      • 2017-11-07
      • 2021-08-23
      • 1970-01-01
      • 1970-01-01
      • 2014-12-22
      • 1970-01-01
      相关资源
      最近更新 更多