I have installed Python 2.7 and trying to use Twitter package. I have installed the 3 pre-requisite packages successfully... But somehow getting this error:
>>> import twitter
>>> api = twitter.Api()
Traceback (most recent call last):
File "<pyshell#30>", line 1, in <module>
api = twitter.Api()
AttributeError: 'module' object has no attribute 'Api'
The I tried this version but got the same error:
>>> api = twitter.Api(consumer_key='consumer_key',
consumer_secret='consumer_secret',
access_token_key='access_token',
access_token_secret='access_token_secret')
Traceback (most recent call last):
File "<pyshell#31>", line 1, in <module>
api = twitter.Api(consumer_key='consumer_key',
AttributeError: 'module' object has no attribute 'Api'
I have installed 3 packages for twitter namely: python-twitter-0.8.5, python-twitter-1.0, twitter-1.10.0
and the output of the command is as below:
>>> twitter.__file__
'C:\\Python27\\lib\\site-packages\\twitter-1.10.0-py2.7.egg\\twitter\\__init__.pyc'
Should I be uninstalling something? I have renamed twitter.py files in python-twitter-0.8.5 and python-twitter-1.0 but still getting the error...