简体   繁体   中英

How do i install xgoogle for Windows?

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?

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!

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM