【发布时间】:2013-08-23 03:16:39
【问题描述】:
我在 Windows 上安装请求模块 (python 2.7) 时遇到问题。
根据文档尝试了以下步骤:
1
pip install requests
错误
'pip' is not recognized as an internal or external command,
operable program or batch file.
2
easy_install requests
错误
'easy_install' is not recognized as an internal or external command,
operable program or batch file.
3
setup.py
错误
C:\Location\Python\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'zip_safe' warnings.warn(msg)
C:\Location\Python\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'include_package_data' warnings.warn(msg)
C:\Location\Python\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplied
谁能告诉我如何在 windows 上安装模块,而不下载任何新东西。
【问题讨论】:
-
pip 和 easy_install 都需要下载。您是否尝试过查看 setup.py 并查看它需要的命令?
-
你必须下载 something。即使您安装了
pip,并且它为您完成了所有工作......它显然必须下载requests才能做到这一点。那么……您要求的实际要求是什么? -
无论如何,你几乎肯定想要 (a) 设置
pip并从现在开始使用它,或者 (b) 使用 Christoph Gohlke's binary packages 并希望你永远不需要他拥有的包没有建造(或他拥有的更新版本)。我强烈推荐(a)——你是一名程序员,你应该知道如何使用你的机器——但是(b)也可以。 -
@abarnert 伙计,我只想安装
requests,无需下载pip或easy_install -
@misguided:当然可以。但为什么这是一个问题?
标签: python python-2.7 module request installation