AttributeError: 'module' object has no attribute 'Api'


Hi all

seriously its a nightmare to just trying to run a simple script…
So, I upgraded Raspbian, upgraded the firmware, installed all python and ran / etc…
running the script is OK
But when I try to run the script described here :
I got the following message error :
root@raspberrypi:/home/pi/GrovePi/Software/Python# python
Traceback (most recent call last):
File “”, line 43, in <module>
api = twitter.Api(consumer_key=‘9RE90qI62xxxxxxxxxCEpfW’,consumer_secret=‘DARiYXsC2Gw6XgiQnHXc7nvnxTLz’,access_token_key=‘11314022-QytUcWVxWZkaHjbPly0QK29ZNT’,access_token_secret=‘psLR9PZO0yPiWuOqczbMPEcC6gvU’)
AttributeError: ‘module’ object has no attribute ‘Api’

Do you know where could come the problem ? please if you have any info or advice, thanks in advance for your feedback, I don’t know what to right now…THANKS !


You are getting module error because the Twitter python library is not installed. Can you install this library: and let me know how it goes.