Originally Posted by
norobro
Works for me in 17.10 too.
As a matter of fact, I can produce the error in python2 because the google package isn't installed:
Code:
$ python search.py
Traceback (most recent call last):
File "search.py", line 2, in <module>
from googlesearch import search
ImportError: No module named googlesearch
$ python3 search.py
https://wordpress.org/support/topic-tag/breaking-code/
https://breakingcode.wordpress.com/
...
@erotavlas - Check if the google package is installed:
Code:
$ ls -nl /home/user/.local/lib/python3.6/site-packages/
total 16
drwxrwxr-x 2 1000 1000 4096 Feb 8 11:43 beautifulsoup4-4.6.0.dist-info
drwxrwxr-x 5 1000 1000 4096 Feb 8 11:43 bs4
drwxrwxr-x 2 1000 1000 4096 Feb 8 11:43 google-2.0.1.dist-info
drwxrwxr-x 3 1000 1000 4096 Feb 8 11:43 googlesearch
Hi,
for me
Code:
ls -nl /home/user/.local/lib/python3.6/site-packages/
ls: cannot access '/home/user/.local/lib/python3.6/site-packages/': No such file or directory
Code:
pip --version
pip 9.0.1 from /home/user/.local/lib/python3.5/site-packages (python 3.5)
Code:
pip list | grep google
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the
[list] section) to disable this warning.
google (2.0.1)
google-api-python-client (1.6.5)
google-search (1.0.2)
search-google (1.2.1)
Adding this code
Code:
import googlesearch
print (googlesearch.__file__)
gave me:
Code:
/home/user/miniconda3/lib/python3.5/site-packages/googlesearch/__init__.py
Originally Posted by
spjackson
Yes, the same commands work just the same on Ubuntu 16.04. The default python on a fresh Ubuntu 16.04.3 desktop install is python 2.7.
Hi,
I just tried with a fresh install of ubuntu 16.04 and it works.
Bookmarks