I am trying to import this library - https://github.com/abenassi/Google-Search-API
I tried
1. Can not import module search from google module in python
2. Python / ImportError: Import by filename is not supported
3. How to import a module given the full path?
I still can't import
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'google' is not defined
even locally
>>> import imp
>>> google = imp.load_source('google', '/home/arjun/.local/lib/python2.7/site-packages/google/__init__.py')
>>> num_page = 3
>>> search_results = google.search("This is my query", num_page)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'search'
>>> google
<module 'google' from '/home/arjun/.local/lib/python2.7/site-packages/google/__init__.pyc'>