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

The shortest work around for this will be:
from googlesearch import search
Your installation of Python came with a built-in module named google which is taking precedence over the one you installed. You have two options:
Use importlib to import the desired module by its filesystem path:
google = importlib.import_module('/usr/local/lib/python2.7/site-packages/google/__init__.py')
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