爬虫时遇到的问题


安装requests库出错:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

解决方法:

windos系统下:

在只安装Anaconda 想要在命令行里用pip安装一些爬虫必要的库时,出现报错

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is_anaconda

解决方法:

网址:https://slproweb.com/products/Win32OpenSSL.html如图下载安装即可:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is_ssl_02

验证包是否安装完成的方法:

1.输入python进入命令行模式

2.输入import requests

3.调用request这个包和get 方法传入百度网址.

可以看到系统输出了200的这个响应,那么库就正式安装好了,说明我们能使用这个库完成正常的网页请求了

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is_python_03