i found solution to this problem in following site
[http://himanen.info/solved-attributeerror-module-object-has-no-attribute-api/][1]
There are two Python libraries conflicting: twitter library and python-twitter library. The solution was quite straightforward:
pip uninstall twitter
Then I just made it sure that python-twitter was certainly installed:
pip install python-twitter
Thank you himanen it worked for me