3

I have tried installing xgoogle for python through easy_install but it didn't work. I have already downloaded the file but

from xgoogle.search import GoogleSearch, SearchError

gives me an error that xgoogle is not recgnised as a module. What should i do next and where should i move this file too?

Kara
  • 6,115
  • 16
  • 50
  • 57
Moushumi Mitra
  • 111
  • 2
  • 3
  • 6

2 Answers2

1

Download the zip file of xgoogle and paste it into /dist-packages or /site-packages directory (that's where python libraries or modules reside). If you are using Linux, the absolute path is: /usr/local/lib/python2.7/dist-packages

Then, try import xgoogle or from xgoogle import GoogleSeach ---> Should work.

Edit:

I downloaded xgoogle myself and it turns out they provide setup.py file. Follow these steps to install.

1) Unzip xgoogle. 2) python setup.py build 3) python setup.py install

Done!

pynovice
  • 7,424
  • 25
  • 69
  • 109
0

Welcome to StackExchange!

What you have to do is get the xgoogle folder in the same directory as your Python file, and then make sure that it has these files:

  • search.py
  • BeatifulSoup.py
  • browser.py
  • __init__.py

Then try import xgoogle or from xgoogle import GoogleSearch, SearchError or also import xgoogle.search or also from xgoogle import *.

If none of these work, tell us what's in the xgoogle folder and where that folder is.

Tell us what happens...

Farid
  • 215
  • 1
  • 2
  • 8
  • Hey, nope import xgoogle doesn't work and neither does the other codes. Also tried on easy_install. Nada. I have already downloaded a zip file of xgoogle but am not sure what to do with it. Have you installed it before? – Moushumi Mitra Jun 29 '13 at 01:49
  • No, never installed it. Can you tell us what installation procedure you followed? – Farid Jun 29 '13 at 09:10