Trouble in 'docsearch' command

Hi, I’m trying to use ‘docsearch’ in ‘docsearch-scraper’.

According to https://community.algolia.com/docsearch/run-your-own.html#installation,
I did all 4 steps and ./docsearch at the docsearch-scraper directory.
But ‘docsearch’ command didn’t work.
The error code what I got as follows:

File "./docsearch", line 3, in <module>

from cli.src.index import run

File "/Users/ted/Documents/OSE_SSG_Test/docsearch-scraper/cli/src/index.py", line 3, in <module>

from dotenv import load_dotenv

ModuleNotFoundError: No module named 'dotenv'

I searched on internet and did a lot of things (includes ‘pip install dotenv’), but it didn’t help…

Is there anyone who knows a solution for me?

:wave: @heeam.shin,

Thank you for raising this issue.

Are you using pipenv to install the whole application? You can find the steps to install it here.

Is the environment correctly set up thanks to pipenv? ( commands pipenv install, pipenv shell)

Otherwise you need to make sure that the package python-dotenv is setup. pip install python-dotenv

Let us know

1 Like

Thanks for your reply

I did exactly what you said (I think…)
after type ‘pip install python-dotenv’ and ‘./docsearch’ command works fine.

But when I tried to do ./docsearch bootstrap, similar problems occured again.
It goes like this:

  1. [ModuleNotFoundError: No module named ‘tldextract’] occurs
  2. Type [pip install tldextract] command
  3. Type [./docsearch bootstrap] command again
  4. [ModuleNotFoundError: No module named ‘ratelimit’] occurs
  5. Type [pip install ratelimit] command
  6. Type [./docsearch bootstrap] command again
  7. [ModuleNotFoundError: No module named ‘urlparse’] occurs
  8. I don’t know what to do…

It seems like that I have to install infinite modules…

:wave: @heeam.shin

It seem the pipenv install command didn’t work on your machine. Please remove the virtual env thanks to pipenv --rm and install it once again via pipenv install. Make sure that you are using the Pipfile provided at the root of the repo.

Let us know.

Cheers

1 Like

Oh!! Thanks!
My problem was using command at the wrong directory not the root of the repo.
I solved the problem.:grinning:

Thank you very much