****************************

申明:本文所有内容仅供学习交流使用,不承担任何法律责任

*****************************

如标题所示:今天被这个问题折腾了好久,后面终于网上找到了原因是由于命名的问题,引用的模块和程序模块同名了,而程序在寻找方法属性时被误导为程序本身,所有抛出了这个错误。

国外网站的解释如下:


Look at the path in the traceback. It looks like you may be importing your own module called pycurl.py, not the actual pycurl library. Try renaming that file to something else so Python imports the real pycurl.


内容来源:http://www.tqzgc.com/articles/8.html