I'm trying to use requests and requests_oauthlib, and right now am just trying the dead simple Twitter verify credentials example they use in the documentation for requests_oauthlib to confirm I've got the basics working. I did a "pip install requests requests_oauthlib" to get the modules. In a terminal window I can "import requests" no problem but when I try "import requests_oauthlib" I get this:
>>> import requests_oauthlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/requests_oauthlib/__init__.py", line 1, in
<module>
from .oauth1_auth import OAuth1
File "/usr/lib/python2.7/site-packages/requests_oauthlib/oauth1_auth.py", line 10, in
<module>
from requests.utils import to_native_string
File "/usr/lib/python2.7/site-packages/requests/utils.py", line 23, in <module>
from . import __version__
ImportError: cannot import name __version__
Line 23 of utils.py does indeed look like this:
from . import __version__
I'm using Python 2.7.5 on Fedora and am currently banging my head against this wall after multiple tries at getting it working, any help would be greatly appreciated...
Aucun commentaire:
Enregistrer un commentaire