Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python - Why is installing oauth2 so hard? [closed]

Tags:

python

So im trying to get oauth2 to work with python. So i downloaded it from github, and ran the setup.py file but that didn't exactly work. I googled some more and found a question here and the answer said to put the folder in python27/Lib/site-packages with a .pth file in the /site-packages folder. The .pth folder has the name of the module folder (oauth2). So that worked... until i went to run it and it said oauth wouldn't run because i didn't have httplib2. So i downlaoded that, did the same exact thing, but ti doesn't work for httplib2? what in hell is going on here? Im way over my gead,a ll i want is the Yahoo Fantasy API to work with python so i can do one simple thing.

Heres where i got the .pth deal: Installing the Swampy Python module on Windows

like image 435
gta0004 Avatar asked Oct 15 '11 23:10

gta0004


1 Answers

I think that you need to go back to square one.

Did you try easy_install oauth2?

Did you try pip install oauth2?

If neither of those work, then you need to install it manually. Having read through the readme on github you know that oauth2 depends on httplib2 so start by installing and testing httplib2. Don't go any further until you know that httplib2 is installed and functioning correctly.

Next step is to manually install oauth2. Lots of Python modules have a setup.py script so you can just change to their directory and run python setup.py install to get the module properly installed. In fact, oauth2 does have such a module so you should try that first.

Then if it still doesn't work it is a matter of making sure that the oauth2 directory is on your search path. Most people would put it in their site-packages directory, but it is OK to just add the oath2 directory (the one containing __init__.py, to the Python path. That is what .pth files do.

If you don't have easy_install or pip, the easiest way to solve this problem is to download http://python-distribute.org/distribute_setup.py and execute it on your system. This will install both pip and easy_install for you.

like image 75
Michael Dillon Avatar answered Nov 17 '22 02:11

Michael Dillon