Python里的request库安装
安装request库python里的request库经常被用于进行网络爬虫,想要学习网络爬虫的同学必须得安装request这个第三方库,接下来就是安装这个库的步骤刚开始时,你是没有这个模块的那么就得安装导入了方法一:1.确定自己以前没有安装过,那么就打开这个网址,进去下载(gz)https://pypi.org/project/pip/#files等待下载好后,解压再放到你的python文件夹里的
安装request库
python里的request库经常被用于进行网络爬虫,想要学习网络爬虫的同学必须得安装request这个第三方库,接下来就是安装这个库的步骤
刚开始时,你是没有这个模块的
那么就得安装导入了
方法一:
1.确定自己以前没有安装过,那么就打开这个网址,进去下载(gz)https://pypi.org/project/pip/#files
等待下载好后,解压再放到你的python文件夹里的Lib里面
方法二:
利用pip安装,这种方法很简单,但是我这边莫名的会出错
WARNING: You are using pip version 20.3; however, version 21.2.4 is available.
You should consider upgrading via the ‘c:\program files\python38\python.exe -m pip install --upgrade pip’ command.
WARNING: The script tqdm.exe is installed in ‘C:\Users\wj\AppData\Roaming\Python\Python38\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts convert-caffe2-to-onnx.exe and convert-onnx-to-caffe2.exe are installed in ‘C:\Users\wj\AppData\Roaming\Python\Python38\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script f2py.exe is installed in ‘C:\Users\wj\AppData\Roaming\Python\Python38\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
打开命令提示框
然后输入: pip install requests
有的人这样输入之后就好了,但我这边出了点差错
WARNING: You are using pip version 20.3; however, version 21.2.4 is available.
You should consider upgrading via the ‘c:\program files\python38\python.exe -m pip install --upgrade pip’ command.
实际上就是说明你的pip版本需要更新
更新一下
输入:pip install --upgrade pip
或者: python.exe -m pip install --upgrade pip
就好了
更多推荐
所有评论(0)