安装 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内置模块的基础上进行了高度的封装 ...
随机推荐
- SQl格式化日期时间
Sql Server 中一个非常强大的日期格式化函数Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AMSelect CONVE ...
- include_path详细解析
include_path详细解析 原文地址:http://www.laruence.com/2010/05/04/1450.html 1.php默认的包含路径为 .;C:\php\pear 即 ...
- [51NOD1230]幸运数(数位DP)
题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1230 dp(l,s,ss)表示长度为l的数各位和为s,各位平方 ...
- PostgresSql开放局域网访问
1) 确认已经退掉所有的MASF终端和MSF GUI,然后打开PostgresSQL的启动文件在文件POSTGRESQL_START参数后面添加-h 0.0.0.0,让PostgreSQL启动时绑定到 ...
- zoj 1010 (线段相交判断+多边形求面积)
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=10 Area Time Limit: 2 Seconds Mem ...
- hdu 5137 How Many Maos Does the Guanxi Worth 最短路 spfa
How Many Maos Does the Guanxi Worth Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/5 ...
- git学习笔记12-标签管理-版本
发布一个版本时,我们通常先在版本库中打一个标签(tag),这样,就唯一确定了打标签时刻的版本.将来无论什么时候,取某个标签的版本,就是把那个打标签的时刻的历史版本取出来.所以,标签也是版本库的一个快照 ...
- luabind 导出string问题
luabind导出字符串 不能导出char* 会有问题 应该是字符串连接的时候出错了 static _TCHAR* pRetChar = new _TCHAR[10]; memcpy(pRetChar ...
- iOS - OC NSSize 尺寸
前言 结构体,这个结构体用来表示事物的宽度和高度. typedef CGSize NSSize; struct CGSize { CGFloat width; CGFloat height; }; t ...
- linux终端下 编译c语言程序
linux终端下,编译C语言程序步骤为: 采用vi进行源代码编写,编写完成后,:wq存盘退出,如: vi test.c 在命令行下,运行gcc编译程序,生成执行码,如: gcc -o test te ...