simbake / web_search

web search extension for text-generation-webui
GNU General Public License v3.0
94 stars 19 forks source link

ModuleNotFoundError: No module named 'googlesearch' #2

Closed Shiimiish closed 1 year ago

Shiimiish commented 1 year ago

I have installed the googlesearch package and a small test script I did is able to access google search and receive search results. So googlesearch should work on my end. I can execute the test script in various directories, the path to the googlesearch package should be set and work ok.

But when I start the extension I get this error: File "\mypath...\oobaboogawindows\text-generation-webui\extensions\web_search\script.py", line 3, in from googlesearch import search ModuleNotFoundError: No module named 'googlesearch'

this is on Windows 11

simbake commented 1 year ago

the package is googlesearch-python. Did you run pip install -r requirements.txt in websearch directory to install it automatically?

simbake commented 1 year ago

In your env you can do pip install googlesearch-python to fix the issue.

Shiimiish commented 1 year ago

thanks for responding so quickly! Also I'm a noob, so the problem is probably on my end.

I did run the pip install -r requirements.txt in websearch directory and the install seems to have worked just fine

Shiimiish commented 1 year ago

If I run pip install googlesearc-python, I get the message: "Requirement already satisfied". Still the same error, when I try to start the extension

simbake commented 1 year ago

It seems the package is not installed in your conda environment. You can run cmd_windows and try pip install from there. One has to activate the conda env so that web_search can find the package. conda env is activated with conda activate myenv. Replace myenv with your env name.

Shiimiish commented 1 year ago

If I run pip install googlesearc-python, I get the message: "Requirement already satisfied". Still the same error, when I try to start the extension

Shiimiish commented 1 year ago

I had to install Anaconda3 to be able to set conda environments. Did that and now I set the conda environment with conda activate \mypath...\oobaboogawindows\installer_files\env which results in my CMD prompt looking like this:

(D:\mypath...\oobaboogawindows\installer_files\env) D:\mypath...\oobaboogawindows\text-generation-webui\extensions\web_search>

I did the pip install again ... getting the message "requirements already fullfilled" still have the same error message

fwiw - I have several other extensions installed and got them working (silero_tts, whisper_stt, send_pictures, ...).

Sorry to bother with an issue that is likely on my side :(

iChristGit commented 1 year ago

If I run pip install googlesearc-python, I get the message: "Requirement already satisfied". Still the same error, when I try to start the extension

Try doing pip install googlesearch-python inside the cmd_windows.cmd

Shiimiish commented 1 year ago

I tried that, but that doesn't solve the issue unfortunately. However, I think the problem on my end comes from the fact, that I also use A1111 for Stable Diffusion and that seems to interfere. I tried a few things to solve this packet issue, with the effect that my A1111 installation is now broken ^^. I'm scrubbing my system for now, uninstalling Anaconda, Python, Torch, ... and try to get a new clean install of everything. Maybe then it'll work. But I'll probably need to get a better understanding if what I'm doing anyway :)

Shiimiish commented 1 year ago

Thank you to all, that try to help !!

simbake commented 1 year ago

Your are welcome, hope your solution works out for you. Regards.