在python 2.7 Windows中安装请求模块 [英] installing requests module in python 2.7 windows

查看:84
本文介绍了在python 2.7 Windows中安装请求模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows上安装请求模块(python 2.7)时遇到问题.

I am facing issues while installing request module (python 2.7) on windows.

按照文档尝试了以下步骤:

Tried the below steps as per documentation:

1

pip install requests

错误

'pip' is not recognized as an internal or external command, operable program or batch file.

'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.

'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上安装该模块,而不下载任何新内容.

Can anyone please advise how to install the module on windows , without downloading any new stuff.

推荐答案

此处有四个选项:

  1. 设置virtualenv.您创建的每个虚拟环境都会自动具有pip.

全局设置pip.

了解如何手动安装Python软件包-在大多数情况下,下载,解压缩,python setup.py install一样简单,但并非总是如此.

Learn how to install Python packages manually—in most cases it's as simple as download, unzip, python setup.py install, but not always.

使用 Christoph Gohlke的二进制安装程序.

这篇关于在python 2.7 Windows中安装请求模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆