api = twitter.Api() AttributeError: 'module' object has no attribute 'Api

后端 未结 7 1137
借酒劲吻你
借酒劲吻你 2020-12-17 10:14

I have been trying to write a simple mention grabber to get started with the twitter Api. Howsoever I\'ve been experienceing some difficulties when initializing the Api. Run

7条回答
  •  萌比男神i
    2020-12-17 10:42

    i found solution to this problem in following site

    [http://himanen.info/solved-attributeerror-module-object-has-no-attribute-api/][1]

    There are two Python libraries conflicting: twitter library and python-twitter library. The solution was quite straightforward:

    pip uninstall twitter
    

    Then I just made it sure that python-twitter was certainly installed:

    pip install python-twitter
    

    Thank you himanen it worked for me

提交回复
热议问题