安装 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内置模块的基础上进行了高度的封装 ...
随机推荐
- C#部署安装,将用户安装路径记录下写入注册表,并启动
安装部署程序,将安装目录写入注册表 (1)在“安装部署项目”上点击“注册表编辑器” (2)在HKey_LOCAL_MACHINE_SoftWare 下新建键 Manufacturer 代表软件的制造商 ...
- ubuntu下phpstorm无法输入中文的解决办法
http://blog.csdn.net/woshiliulei0/article/details/51657356 今天期待已久的搜狗输入法linux版上线了,对于我们这种之前用习惯了搜狗输入法的屌 ...
- Verify an App Store Transaction Receipt 【苹果服务端 验证一个应用程序商店交易收据有效性】
转自:http://blog.csdn.net/saindy5828/article/details/6414014 1. 从Transaction 的TransactionReceipt属性中得到接 ...
- python_way day16 DOM
Python_way day16 1.Dom (找到html中的标签) 一.DOM 1.查找元素 直接查找 document.getElementById 根据ID获取一个标签 --->这里是 ...
- 关于Docker 常用命令
Docker 常用命令 分类列一下常用的CLI命令 仓库相关 search/ pull / push / login etc. 例:docker pull ubuntu 从仓库下载ubuntuimag ...
- 表单美化-原生javascript和jQuery单选按钮(兼容IE6)
最近很多人问怎么美化表单的元素,大家都知道表单元素在各个浏览器中的表现不一,反正也是特别的丑,那么问题就来了,我们能自己设计表单元素的外观么?答案是可以的,现在我们就来试试吧.我们用两种方式来实现这一 ...
- iOS - OC NSSize 尺寸
前言 结构体,这个结构体用来表示事物的宽度和高度. typedef CGSize NSSize; struct CGSize { CGFloat width; CGFloat height; }; t ...
- HBase介绍及简易安装(转)
HBase介绍及简易安装(转) HBase简介 HBase是Apache Hadoop的数据库,能够对大型数据提供随机.实时的读写访问,是Google的BigTable的开源实现.HBase的目标是存 ...
- SAP接口编程 之 JCo3.0系列(04) : 会话管理
在SAP接口编程之 NCo3.0系列(06) : 会话管理 这篇文章中,对会话管理的相关知识点已经说得很详细了,请参考.现在用JCo3.0来实现. 1. JCoContext 如果SAP中多个函数需要 ...
- [转载] Go语言并发之美
原文: http://qing.blog.sina.com.cn/2294942122/88ca09aa33002ele.html 简介 多核处理器越来越普及,那有没有一种简单的办 ...