今天学习Requests库,当用pip install requests安装后,写了一段代码报错:AttributeError: module ‘requests‘ has no attribute ‘post‘”

解决:AttributeError: module 'requests' has no attribute 'post'”

发现原来是文件名命名有问题:

解决:AttributeError: module 'requests' has no attribute 'post'”

发现文件的命名与导入的库名一样了,所以会报错。将文件名更正一下就解决问题了。

相关文章: