Can not import module search from google module in python

Viewed 17890

I installed the google module by Mario Vilas in my virtual environment in ubuntu 14.04 with python2.7 https://pypi.python.org/pypi/google I have done this before in both windows and Ubuntu and it worked fine. However, now when I do the following

>>> from google import search
Traceback (most recent call last):
  File "<input>", line 1, in <module>
ImportError: cannot import name search

I am using pycharm and I can view the package and its modules and I can auto insert using ctrl+space

I tried giving total privileges to the virtual venv package using sudo chmod -R ugo+rX but to no avail

enter image description here

6 Answers

The shortest work around for this will be:

from googlesearch import search

simply install both google and google-search

pip install google pip install google-search

It works for me

Just import google and you will be all set :)

import google

It is tested and verified.

I have gone through the same problem and i solve it by importing googlesearch API like this: from googlesearch import *

Related