Google-Search-API icon indicating copy to clipboard operation
Google-Search-API copied to clipboard

Can't install

Open Filiprb opened this issue 6 years ago • 21 comments

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?

Filiprb avatar Mar 16 '18 18:03 Filiprb

I have same issue

scoocs avatar Mar 17 '18 04:03 scoocs

the same over here

mhamedLmarbouh avatar Mar 21 '18 04:03 mhamedLmarbouh

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.

Detoy avatar Mar 22 '18 17:03 Detoy

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

sudo pip install Google-Search-API

abhishtagatya avatar Mar 24 '18 07:03 abhishtagatya

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/

stella-lu avatar May 31 '18 22:05 stella-lu

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

RealistikDash avatar May 31 '18 23:05 RealistikDash

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'"

stella-lu avatar Jun 01 '18 03:06 stella-lu

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

RealistikDash avatar Jun 01 '18 10:06 RealistikDash

@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 :)

JuaniFilardo avatar Jun 01 '18 23:06 JuaniFilardo

@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'

stella-lu avatar Jun 02 '18 00:06 stella-lu

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

JuaniFilardo avatar Jun 02 '18 01:06 JuaniFilardo

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

stella-lu avatar Jun 02 '18 01:06 stella-lu

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

anisayari avatar Jun 11 '18 11:06 anisayari

@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?

ghost avatar Jun 17 '18 21:06 ghost

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

JuaniFilardo avatar Jun 17 '18 21:06 JuaniFilardo

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

ghost avatar Jun 17 '18 21:06 ghost

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

ghost avatar Jun 18 '18 03:06 ghost

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

ghost avatar Jun 18 '18 03:06 ghost

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 .

harsh085 avatar Jul 21 '18 17:07 harsh085

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 avatar Mar 13 '19 15:03 ahammad52003

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

ahammad52003 avatar Mar 18 '19 17:03 ahammad52003