python3 requests 安装包下载安装[windows]

听语音
  • |
  • 浏览:54
  • |
  • 更新:2016-07-25 17:09

windows下直接使用:easy_install requests或者pip install requests来安装总是报错:要么找不到安装包,要么timedout。总之一个不爽。现在还是介绍下载离线源码手动安装的方法。

工具/原料

 
  • python 3运行环境[windows]

方法/步骤

 
  1.  

    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.  

    2. 用WinRAR等解压其中的kennethreitz-requests-fb01456到Python 3安装目录 d:\Programs\Python\Python35-32\kennethreitz-requests-fb01456\。

  3.  

    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

  4.  

    安装完成的部分提示:

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

    在IDLE中输入import requests,如果没提示错误,那说明已经安装成功了!

安装 request模块的更多相关文章

  1. python中安装request模块

    使用命令行(cmd)进入到python安装目录下的Scripts文件夹(也可以先进入目标文件夹然后在文件路径上打开cmd回车即可) 在命令行中输入pip install requests,等待安装完成 ...

  2. windows安装Python模块:requests

    个人在windows10安装python模块requests如下过程: 1.下载requests模块:首先打开powershell, cd到你要下载文件的位置(我的是d:\softwareinstal ...

  3. python自动化测试学习笔记-6urllib模块&request模块

    python3的urllib 模块提供了获取页面的功能. urllib.request.urlopen(url, data=None, [timeout, ]*, cafile=None, capat ...

  4. Request模块入门学习

    使用指令npm install --save request来安装模块,然后使用var request = require('request')完成引用. 对于GET请求,主要是获取目的url中数据. ...

  5. 安装第三方模块方法和requests

    如何安装第三方模块 pip3         pip3 install xxxx          源码         下载,解压         进入目录 python setup.py inst ...

  6. node.js的request模块

    request模块让http请求变的更加简单.最简单的一个示例: 1: var request = require('request'); 2:  3: request('http://www.goo ...

  7. 搭建MHA时 yum 安装perl模块提示 baseurl 错误

    今天在搭建MySQL MHA  安装MHA node所需的perl模块(DBD:mysql)时遇到了一个小的错误,如果思路不对的话,还是产生不少麻烦. 现梳理记录下来. 问题现象 执行的命令 yum ...

  8. 关于模块安装及cmd安装pip3模块失败的 Read timed out.的补救方法

    自己在安装pip中的request模块时,安装到一半老是报错.我看了下报错的代码最后一句写的是 Read timed out. 就是读取超时,从网上查了一下,原因是由于中国的网比较慢,下载超时.需要在 ...

  9. request 模块详细介绍

    request 模块详细介绍 request Requests 是使用 Apache2 Licensed 许可证的 基于Python开发的HTTP 库,其在Python内置模块的基础上进行了高度的封装 ...

随机推荐

  1. Freebie: Date Picker Calendar Demo Form For Oracle Forms 6i

    I have already posted and provided the required PLSQL Library and the Calendar FMX file in my previo ...

  2. CUBRID学习笔记 10 数据库文件的类型和含义

    demodb contains the database data; demodb_lgar000, 001 and so forth are log archives used for point ...

  3. JS——JavaScript Confirm

    function show_confirm(){var r=confirm("Press a button!");if (r==true) { alert("You pr ...

  4. java使用方法总结

    第一章 字符串 . 获取字符串的长度: length() . 判断字符串的前缀或后缀与已知字符串是否相同 前缀 startsWith(String s) .后缀 endsWith(String s) ...

  5. iOS - OC NSProcessInfo 系统进程信息

    前言 @interface NSProcessInfo : NSObject NSProcessInfo 类中包含一些方法,允许你设置或检索正在运行的应用程序(即进程)的各种类型的信息. 1.获取系统 ...

  6. iOS - Swift NSLocale 本地化信息

    前言 public class NSLocale : NSObject, NSCopying, NSSecureCoding NSLocale 类返回本地化信息,主要体现在"语言" ...

  7. Linux vi 中移动光标 命令

    移动光标 上:k nk:向上移动n行 9999k或gg可以移到第一行 G移到最后一行下:j nj:向下移动n行左:h nh:向左移动n列右:l nl:向右移动n列 w:光标以单词向前移动 nw:光标向 ...

  8. Android 四种简单的动画(淡入淡出、旋转、移动、缩放效果)

    最近在Android开发当中,用到的动画效果. public void onClick(View arg0) { // TODO 自动生成的方法存根 switch (arg0.getId()) { c ...

  9. Matlab中的persistent变量

    persistent, 用于定义persistent变量.persistent变量对于声明它的函数来说是局部的,但是当退出该函数时,该变量仍然保存在内存中,数值并不变.persistent变量与全局变 ...

  10. 在Android中查看和管理sqlite数据库

    在Android中可以使用Eclipse插件DDMS来查看,也可以使用Android工具包中的adb工具来查看.android项目中的sqlite数据库位于/data/data/项目包/databas ...