I am using TwitterAPI of python(ubuntu+pycharm).
I install TwitterAPI by "pip install networkx TwitterAPI". I just import TwitterAPI as follows:
from TwitterAPI import TwitterAPI
When I execute the python file ,there is a mistake as follows:
File "/home/hanlu/PycharmProjects/cs579/a1.py", line 29, in <module>
from TwitterAPI import TwitterAPI
File "/home/hanlu/.local/lib/python2.7/site-packages/TwitterAPI/TwitterAPI.py", line 7, in <module>
from requests_oauthlib import OAuth1
File "/home/hanlu/.local/lib/python2.7/site-packages/requests_oauthlib/__init__.py", line 3, in <module>
from .oauth2_auth import OAuth2
File "/home/hanlu/.local/lib/python2.7/site-packages/requests_oauthlib/oauth2_auth.py", line 3, in <module>
from oauthlib.oauth2 import is_secure_transport
ImportError: cannot import name is_secure_transport
my python an pycharm as follows:
>> python
python 2.7.7
>>import oauthlib
>>oauthlib__version__
'0.6.3'
I still can't figure it out , what wrong with my environment?
Use oauthlib-0.7.1 to fix the problem.
sudo pip install oauthlib --upgrade
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With