I am trying to use Yelp's API using oauth2 package (version 2), the Python 3.4 (in Anaconda's Spyder) code is like:
consumer = oauth2.Consumer(CONSUMER_KEY, CONSUMER_SECRET)
and I get this error message:
AttributeError: 'module' object has no attribute 'Consumer'
I'm guessing Consumer doesn't exist in this version of oauth2! Any help would be appreciated,
There is some problem with default installation of oauth2 using
pip install oauth2
. Right now I tried it on both Python 2.7 and Python 3.4 on Anaconda, its not working. You can copy the code ( _ _ init _ _.py) from here into your _ _ init _ _.py file and restart your kernel.Location of your _ _ init _ _ .py file can be found via
After restart, kernel may ask for libraries which can be found via
pip search <library_name>
and then doing thepip install <library_name>