python3返回AttributeError: module ‘requests’ has no attribute ‘request’解决方案
最近在尝试学习python方面的内容,爬取url 请求数据的时候会报
response = requests.request("POST", url, data=payload, headers=headers)
AttributeError: module 'requests' has no attribute 'request'
改用 post写法或者get写法都会提示类似的错误
后边经过排查发现是由于文件名命名与引用的包名重复导致
这里只需要把包名更换就可以了