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

2024-10-23 06:06:49

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

4、安装完成的部分提示:creating build\bdist.win32\egg\EGG-INFOcopying requests.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFOcopying requests.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFOcopying requests.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFOcopying requests.egg-info\not-zip-safe -> build\bdist.win32\egg\EGG-INFOcopying requests.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFOcopying requests.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFOcreating distcreating 'dist\requests-2.10.0-py3.5.egg' and adding 'build\bdist.win32\egg' toitremoving 'build\bdist.win32\egg' (and everything under it)Processing requests-2.10.0-py3.5.eggcreating d:\programs\python\python35-32\lib\site-packages\requests-2.10.0-py3.5.eggExtracting requests-2.10.0-py3.5.egg to d:\programs\python\python35-32\lib\site-packagesAdding requests 2.10.0 to easy-install.pth fileInstalled d:\programs\python\python35-32\lib\site-packages\requests-2.10.0-py3.5.eggProcessing dependencies for requests==2.10.0Finished processing dependencies for requests==2.10.0

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

猜你喜欢