首页 > 代码库 > py学习《requests 安装》个人记录使用

py学习《requests 安装》个人记录使用

requests 模块安装

1、下载setuptools工具,下载ez_setup.py-》https://pypi.python.org/pypi/setuptools,点击ez-setup.py 复制到本地后,保存为py文件

2、下载get-pip.py,安装pip http://www.pip-installer.org/en/latest/installing.html#install-or-upgrade-pip,点击get-pip.py 复制到本地后,保存为py文件

3、下载requests tar.gz包

技术分享

4、安装  cd requests目录,执行 setup.py install

PS 最好将1、2步骤的py文件放在requests文件夹中,目的是好找,或者单独放在一个文件夹也OK

安装成功后,会生成一堆文件,如下

D:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: ‘extras_require‘
  warnings.warn(msg)
D:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: ‘zip_safe‘
  warnings.warn(msg)
D:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: ‘include_package_data‘
  warnings.warn(msg)
D:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: ‘install_requires‘
  warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\requests
copying requests\adapters.py -> build\lib\requests
copying requests\api.py -> build\lib\requests
copying requests\auth.py -> build\lib\requests
copying requests\certs.py -> build\lib\requests
copying requests\compat.py -> build\lib\requests
copying requests\cookies.py -> build\lib\requests
copying requests\exceptions.py -> build\lib\requests
copying requests\hooks.py -> build\lib\requests
copying requests\models.py -> build\lib\requests
copying requests\sessions.py -> build\lib\requests
copying requests\status_codes.py -> build\lib\requests
copying requests\structures.py -> build\lib\requests
copying requests\utils.py -> build\lib\requests
copying requests\__init__.py -> build\lib\requests
creating build\lib\requests\packages
copying requests\packages\__init__.py -> build\lib\requests\packages
creating build\lib\requests\packages\chardet
copying requests\packages\chardet\big5freq.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\big5prober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\chardetect.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\chardistribution.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\charsetgroupprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\charsetprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\codingstatemachine.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\compat.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\constants.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\cp949prober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\escprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\escsm.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\eucjpprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\euckrfreq.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\euckrprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\euctwfreq.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\euctwprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\gb2312freq.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\gb2312prober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\hebrewprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\jisfreq.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\jpcntx.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\langbulgarianmodel.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\langcyrillicmodel.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\langgreekmodel.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\langhebrewmodel.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\langhungarianmodel.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\langthaimodel.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\latin1prober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\mbcharsetprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\mbcsgroupprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\mbcssm.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\sbcharsetprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\sbcsgroupprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\sjisprober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\universaldetector.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\utf8prober.py -> build\lib\requests\packages\chardet
copying requests\packages\chardet\__init__.py -> build\lib\requests\packages\chardet
creating build\lib\requests\packages\urllib3
copying requests\packages\urllib3\connection.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3\connectionpool.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3\exceptions.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3\fields.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3\filepost.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3\poolmanager.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3\request.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3\response.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3\_collections.py -> build\lib\requests\packages\urllib3
copying requests\packages\urllib3\__init__.py -> build\lib\requests\packages\urllib3
creating build\lib\requests\packages\urllib3\packages
copying requests\packages\urllib3\packages\ordered_dict.py -> build\lib\requests\packages\urllib3\packages
copying requests\packages\urllib3\packages\six.py -> build\lib\requests\packages\urllib3\packages
copying requests\packages\urllib3\packages\__init__.py -> build\lib\requests\packages\urllib3\packages
creating build\lib\requests\packages\urllib3\contrib
copying requests\packages\urllib3\contrib\ntlmpool.py -> build\lib\requests\packages\urllib3\contrib
copying requests\packages\urllib3\contrib\pyopenssl.py -> build\lib\requests\packages\urllib3\contrib
copying requests\packages\urllib3\contrib\__init__.py -> build\lib\requests\packages\urllib3\contrib
creating build\lib\requests\packages\urllib3\util
copying requests\packages\urllib3\util\connection.py -> build\lib\requests\packages\urllib3\util
copying requests\packages\urllib3\util\request.py -> build\lib\requests\packages\urllib3\util
copying requests\packages\urllib3\util\response.py -> build\lib\requests\packages\urllib3\util
copying requests\packages\urllib3\util\retry.py -> build\lib\requests\packages\urllib3\util
copying requests\packages\urllib3\util\ssl_.py -> build\lib\requests\packages\urllib3\util
copying requests\packages\urllib3\util\timeout.py -> build\lib\requests\packages\urllib3\util
copying requests\packages\urllib3\util\url.py -> build\lib\requests\packages\urllib3\util
copying requests\packages\urllib3\util\__init__.py -> build\lib\requests\packages\urllib3\util
creating build\lib\requests\packages\urllib3\packages\ssl_match_hostname
copying requests\packages\urllib3\packages\ssl_match_hostname\_implementation.py -> build\lib\requests\packages\urllib3\packages\ssl_match_hostname
copying requests\packages\urllib3\packages\ssl_match_hostname\__init__.py -> build\lib\requests\packages\urllib3\packages\ssl_match_hostname
copying requests\cacert.pem -> build\lib\requests
running install_lib
running install_egg_info
Removing D:\Python27\Lib\site-packages\requests-2.5.1-py2.7.egg-info
Writing D:\Python27\Lib\site-packages\requests-2.5.1-py2.7.egg-info

D:\requests-2.5.1>setup.py install
D:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: ‘extras_require‘
  warnings.warn(msg)
D:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: ‘zip_safe‘
  warnings.warn(msg)
D:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: ‘include_package_data‘
  warnings.warn(msg)
D:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: ‘install_requires‘
  warnings.warn(msg)
running install
running build
running build_py
running install_lib
running install_egg_info
Removing D:\Python27\Lib\site-packages\requests-2.5.1-py2.7.egg-info
Writing D:\Python27\Lib\site-packages\requests-2.5.1-py2.7.egg-info

 

py学习《requests 安装》个人记录使用