安装 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内置模块的基础上进行了高度的封装 ...
随机推荐
- 高通平台点亮LCD个人总结
点击打开链接 高通平台LCD模块大致分为两部分:KERNEL和LK.在进行点屏之前,应该认真查看LCD原理图,弄清楚LCD亮屏需要满足的条件和上电时序,同时可以跟LCD IC原厂拿到初始化代码. 首先 ...
- N年后给自己一些忠诚的建议
给自己S年后的一封信: 也许,现在的自己已经经历了种种历练,或成为干将,许是拔杆而起的创业者,再者仍然是一名奋斗中的工薪族.无论现在如何,请记得: M年前,自己坐在小房子里写下的信件. 那时候,自己是 ...
- C语言实现单向链表及其各种排序(含快排,选择,插入,冒泡)
#include<stdio.h> #include<malloc.h> #define LEN sizeof(struct Student) struct Student / ...
- 【转】JSP总结
day1 JSP 定义: 1)Java Server Page, Java EE 组件,本质上是 Servlet. 2)运行在 Web Container.接收 Http Reques ...
- chmod 无法修改磁盘文件的权限解释 (光盘文件就是只读的,修改不了的)
我们知道root用户是linux执行权限最高的管理者用户,他可以进行任何的权限操作:然而我们的操作系统同样也考虑过这样的弊端,就是当我们使用者并不了解文件属性和重要性时会给予我们使用者提示: 举个例子 ...
- Know How To Use ID_NULL Function To Search An Object In Oracle Forms
ID_NULL built in function is used to determine that an object type variable is null or not null in O ...
- vim使用札记
最近开始用vim编辑器了,从最开始的配置到现在慢慢使用,我在这儿会贴出一些我的使用上遇到过的问题和如何解决的方案,留给自己和一些会用到的人看看 1.vim怎么使汇编语法高亮 开始不知道,然后把文件的后 ...
- 解决properties文件乱码问题(eclipse和MyEclipse)
windows——>Preferences——>General——>ContentTypes——>Text——>Java Properties File,设置Defaul ...
- [SAP ABAP开发技术总结]结构复用(INCLUDE)
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- [转载] 彻底学习STL中的Allocator
原文: http://cissco.iteye.com/blog/379093 帮助我们理解allocator的原理 Allocator是C++语言标准库中最神秘的部分之一.它们很少被显式使用,标准也 ...