abenassi / Google-Search-API

Python based api for searching google web, images, calc, and currency conversion.
553 stars 218 forks source link

Can't install #48

Open Filiprb opened 6 years ago

Filiprb commented 6 years ago

Hello,

I'm having trouble installing this package. I use the comand:

pip install Google-Search-API

but get the following error

"Command "python setup.py egg_info" failed with error code 1 in..."

I have tried

pip install --upgrade setuptools pip install ez_setup easy_install -U setuptools

without success. Can anyone help me on this issue?

scoocs commented 6 years ago

I have same issue

mhamedLmarbouh commented 6 years ago

the same over here

Detoy commented 6 years ago

Same issue. It said that the package does not support this version of Python when I tried to install from the .whl file. There has to be a workaround I think.

abhishtagatya commented 6 years ago

use sudo for root access (If your on UNIX / Linux)

sudo pip install Google-Search-API

stella-lu commented 6 years ago

I'm having the same problem and even after trying: sudo pip install Google-Search-API sudo -H pip install Google-Search-API I'm getting the same error message. Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-j1q0s471/Google-Search-API/

RealistikDash commented 6 years ago

just clone the project, copy to your project directory and add from google import google to your project. Just a temporary workaround.

stella-lu commented 6 years ago

From the readme, how would I import the package from the Google-Search API folder? I've tried:

import os
os.chdir("/Users/Name/project-folder-name/Google-Search-API/")
from google import google

which results in "ModuleNotFoundError: No module named 'google'"

RealistikDash commented 6 years ago

I mean it works for me in my project and I have python 3.6.5

JuaniFilardo commented 6 years ago

@stella-lu, I reckon that a better option than os.chdir() might be:

import sys
sys.path.append('/home/your_user/Projects/Google-Search-API')
from google import google

That should do. Try it and let me know if that helps :)

stella-lu commented 6 years ago

@JuaniFilardo I tried:

import sys
sys.path.append('/Users/Name/Project/Google-Search-API')
from google import google

and I get this error:

Traceback (most recent call last):
  File "main.py", line 7, in <module>
    from google import google
  File "/Users/Cactus/wiki-word-frequency/Google-Search-API/google/__init__.py", line 2, in <module>
    from .modules import calculator, currency, images, utils
  File "/Users/Cactus/wiki-word-frequency/Google-Search-API/google/modules/__init__.py", line 2, in <module>
    from . import calculator
  File "/Users/Cactus/wiki-word-frequency/Google-Search-API/google/modules/calculator.py", line 4, in <module>
    from unidecode import unidecode
ModuleNotFoundError: No module named 'unidecode'
JuaniFilardo commented 6 years ago

That's because you didn't install the packages needed. First run pip install -r requirements.txt (or install each module manually till you don't get any errors).

stella-lu commented 6 years ago

@JuaniFilardo Thank you! I'm a little new to all of this, but that worked.

anisayari commented 6 years ago

I am not quite sure that this issue is referenced to #55 ... By the way I got the same issue trying a first installation .

File ".\google\__init__.py", line 1, in <module>
        from modules import calculator, currency, images, utils
    ModuleNotFoundError: No module named 'modules'
 ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
ghost commented 6 years ago

@JuaniFilardo I ran your code yet i still get a Traceback (most recent call last): File "testing.py", line 3, in <module> from google import google ImportError: cannot import name 'google' Is there anything i could do?

JuaniFilardo commented 6 years ago

@asharpie How did you install and how are you importing the module? I mean, did you appended the path or something?

ghost commented 6 years ago

Nvm i fixed it by just adding the directory to my project and importing it from there @JuaniFilardo Ty though!

ghost commented 6 years ago

Wait i was wrong, i was importing the google directory and not the google.py, idk what to do lol. @JuaniFilardo

ghost commented 6 years ago

And I did append the path etc this is my code:

sys.path.append('path/to/directory/Google-Search-API') from google import google but then once run i get:

File "testing.py", line 3, in <module> from google import google ImportError: cannot import name 'google' @JuaniFilardo

harsh085 commented 6 years ago

i tried different solutions but it always show error-

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'google'

please help me .

ahammad52003 commented 5 years ago

I got the following error to install from here.

Error: ModuleNotFoundError: No module named 'unidecode'

Command "python setup.py egg_info" failed with error code 1 in C:\Users\parul\AppData\Local\Temp\pip-req-build-a580mht0\

Note: I updated pip, setuptools & ez_setup

could you please help me?

ahammad52003 commented 5 years ago

I got the following error to install from here.

Error: ModuleNotFoundError: No module named 'unidecode'

Command "python setup.py egg_info" failed with error code 1 in C:\Users\parul\AppData\Local\Temp\pip-req-build-a580mht0\

Note: I updated pip, setuptools & ez_setup

could you please help me?

I fixed it.

Just clone it to C:\Users\userName\Documents\Google-Search-API

  1. open command Prompt and type- cd C:\Users\userName\Documents\Google-Search-API
  2. pip install -r requirements.txt -t C:\Users\userName\AppData\Local\Programs\Python\Python36\Scripts
  3. python setup.py install