ImportError with googlesearch package in Python -
i'm confused since when @ source code there googlesearch class. here's did:
pip --version pip 8.0.2 (python 2.7) pip install -u googlesearch pip show googlesearch
metadata-version: 2.0 name: googlesearch version: 0.7.0 summary: python wrapper around google custom search json/atom api. supports proxies. home-page: https://github.com/frrmack/googlesearch author: irmak sirer author-email: irmak.sirer@gmail.com license: mit location: (directory on computer) requires: requests
from googlesearch import googlesearch gs = googlesearch("test") url in gs.top_urls(): print url
importerror: cannot import name googlesearch
here's source: https://github.com/frrmack/googlesearch/tree/master/googlesearch
edit: installed python on fresh ubuntu 12.04 computer , pip install -u googlesearch tried script. worked.
is possible there package have installed interfering googlesearch, if wasn't included in python script? how go figuring out going on?
i figured out.
i named file using test module googlesearch, googlesearch.py
apparently caused conflict. whoops. changed name gsearch.py , fine.
Comments
Post a Comment