安装 request模块
python3 requests 安装包下载安装[windows]
- |
- 浏览:54
- |
- 更新:2016-07-25 17:09
windows下直接使用:easy_install requests或者pip install requests来安装总是报错:要么找不到安装包,要么timedout。总之一个不爽。现在还是介绍下载离线源码手动安装的方法。
工具/原料
- python 3运行环境[windows]
方法/步骤
1. 在http://cn.python-requests.org/zh_CN/latest/user/install.html#pip-install-requests 页面找到”也可以下载 tarball:“超链接( https://github.com/kennethreitz/requests/tarball/master ),右键》链接另存为 下载安装包“kennethreitz-requests-v2.10.0-63-gfb01456.tar.gz”。
2. 用WinRAR等解压其中的kennethreitz-requests-fb01456到Python 3安装目录 d:\Programs\Python\Python35-32\kennethreitz-requests-fb01456\。
3. 开始》运行》cmd打开一个命令行窗口,依次输入以下三个命令:
d:
cd d:\Programs\Python\Python35-32\kennethreitz-requests-fb01456>
d:\Programs\Python\Python35-32\kennethreitz-requests-fb01456>..\python setup.py install
其中:
第一个命令切换当前目录到D盘
第二个命令切换当前目录到下载解压的requests在Python3安装的位置
第三个命令调用父目录下的python.exe执行requests的安装脚本即setup.py,参数是install
安装完成的部分提示:
creating build\bdist.win32\egg\EGG-INFO
copying requests.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying requests.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying requests.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying requests.egg-info\not-zip-safe -> build\bdist.win32\egg\EGG-INFO
copying requests.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying requests.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
creating dist
creating 'dist\requests-2.10.0-py3.5.egg' and adding 'build\bdist.win32\egg' to
it
removing 'build\bdist.win32\egg' (and everything under it)
Processing requests-2.10.0-py3.5.egg
creating d:\programs\python\python35-32\lib\site-packages\requests-2.10.0-py3.5.
egg
Extracting requests-2.10.0-py3.5.egg to d:\programs\python\python35-32\lib\site-
packages
Adding requests 2.10.0 to easy-install.pth file
Installed d:\programs\python\python35-32\lib\site-packages\requests-2.10.0-py3.5
.egg
Processing dependencies for requests==2.10.0
Finished processing dependencies for requests==2.10.0
- 5
在IDLE中输入import requests,如果没提示错误,那说明已经安装成功了!
安装 request模块的更多相关文章
- python中安装request模块
使用命令行(cmd)进入到python安装目录下的Scripts文件夹(也可以先进入目标文件夹然后在文件路径上打开cmd回车即可) 在命令行中输入pip install requests,等待安装完成 ...
- windows安装Python模块:requests
个人在windows10安装python模块requests如下过程: 1.下载requests模块:首先打开powershell, cd到你要下载文件的位置(我的是d:\softwareinstal ...
- python自动化测试学习笔记-6urllib模块&request模块
python3的urllib 模块提供了获取页面的功能. urllib.request.urlopen(url, data=None, [timeout, ]*, cafile=None, capat ...
- Request模块入门学习
使用指令npm install --save request来安装模块,然后使用var request = require('request')完成引用. 对于GET请求,主要是获取目的url中数据. ...
- 安装第三方模块方法和requests
如何安装第三方模块 pip3 pip3 install xxxx 源码 下载,解压 进入目录 python setup.py inst ...
- node.js的request模块
request模块让http请求变的更加简单.最简单的一个示例: 1: var request = require('request'); 2: 3: request('http://www.goo ...
- 搭建MHA时 yum 安装perl模块提示 baseurl 错误
今天在搭建MySQL MHA 安装MHA node所需的perl模块(DBD:mysql)时遇到了一个小的错误,如果思路不对的话,还是产生不少麻烦. 现梳理记录下来. 问题现象 执行的命令 yum ...
- 关于模块安装及cmd安装pip3模块失败的 Read timed out.的补救方法
自己在安装pip中的request模块时,安装到一半老是报错.我看了下报错的代码最后一句写的是 Read timed out. 就是读取超时,从网上查了一下,原因是由于中国的网比较慢,下载超时.需要在 ...
- request 模块详细介绍
request 模块详细介绍 request Requests 是使用 Apache2 Licensed 许可证的 基于Python开发的HTTP 库,其在Python内置模块的基础上进行了高度的封装 ...
随机推荐
- android 串口调试
在usb调试过程中,都会选择串口查看log,更希望在串口中输入命令查看相关状态.但是一般情况下串口调试时 进程用户是shell,即使你在adb shell下是root用户. 暴力方法是在 adroid ...
- Android 基础
1. 安卓的平台构建 例如我的手机 内核版本就是ubuntu 为手机硬件提供各种驱动. 架构的简单理解: Application(应用程序层) 我们一般说的应用层的开发就是在这个层次上进行的,当然包 ...
- PHP clone
PHP clone 定义一个电视类 class Tv{public $width=100;public function setWidth($v){$this->width = $v; ...
- 暴雪游戏-守望先锋-FPS
http://us.battle.net/overwatch/en/
- win8下安装matlab7.0
在win8下安装matlab7.0会出现一些兼容性的问题,需要设置系统环境变量,修改方式如下. 1.设置环境变量,方法:在你的安装目录的\MATLAB7\bin\win32有一个叫做atlas_Ath ...
- 构建工具之 - Gradle一般使用常见问答
Gradle借助Groovy语言作为其配置脚本,使得Gradle变的十分强大,几乎是无所不能,我们在掌控这个强大且功能繁多的工具时也比较困难和凌乱,因此本文记录一些使用过程常见的配置,以备不时之需! ...
- SQL SERVER 2005中同义词实例
From : http://www.cnblogs.com/jackyrong/archive/2006/11/15/561287.html 在SQL SERVER 2005中,终于出现了同义词了,大 ...
- Ubuntu Install Chrome Brwoser
在ubuntu下安装chrome浏览器,可以直接从官网下载:http://www.google.cn/intl/zh-CN/chrome/browser/thankyou.html?platform= ...
- FLASH CC 2015 CANVAS 导出图片出现缩放问题
最近有项目 没时间更新教程 刚才出现一个问题 就是导出动画后,发现有图片无故被缩放(与软件内的设置不一样) 经过排查 发现动画师 直接将位图 进行了缩放, 导出后出现问题 把文图转换为影片剪辑后,做缩 ...
- MongoDB 权限
1.使用mongod 启动后(加入了--auth后操作数据库则需要权限) mongod --dbpath=D:\mongdb\db --logpath=D:\mongodb\log.txt --por ...