requests模块安装

使用python写接口,必不可少的就是requests,所以事先要在python中安装requests
 
 
一.使用pip install安装(项目的命令行终端使用)
1.配置下载源地址路径(清华源pip)
win使用:pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
mac使用:pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
2.安装
win:pip install requests
mac:pip install requests
二.使用pycharm自带功能进行安装
点击file>settings>project:untitled(项目名)>project lnterpreter>点击右边出现的+号选择Manage Repositories
配置下载地址(https://pypi.tuna.tsinghua.edu.cn/simple) 在Available Packages页面搜索框中搜索requests,点
击install package下载,下载完成后在project lnterpreter页面可以看见requests及版本,若要卸载选中requests
点击右边的减号即可。
posted @ 2021-01-02 20:55  余生没有余生  阅读(311)  评论(0)    收藏  举报