assafelovic / gpt-researcher

GPT based autonomous agent that does online comprehensive research on any given topic
https://gptr.dev
MIT License
13.06k stars 1.61k forks source link

How to run repo on a mac with local folder? #516

Closed Korayem closed 3 weeks ago

Korayem commented 1 month ago

I am having trouble due to setup not complete so I did the following

nltk

Download nltk files from https://www.nltk.org/nltk_data/ Punkt and extract to: Users › korayem > nItk_data › tokenizers > punkt averaged_perceptron_tagger and extract to: Users › <username> > nitk_data › taggers > averaged_perceptron_tagger

Update requirements.txt

Many packages where not there. Add the following:

networkx
python-pptx
xlsxwriter
pillow
pandas
openpyxl

I am not sure what else is missing

Thought of sharing in case anyone else is stuck like I was

assafelovic commented 1 month ago

Hey @Korayem can you share the error logs?

Korayem commented 1 month ago

Hey @assafelovic It's was all trial an error night yesterday :)

I took a fresh git clone, added .env then started to get error loading networkx Added that to requirements, run again, get an error loading python-pptx and so on...

As for NLTK, I got

Resource punkt not found.
  Please use the NLTK Downloader to obtain the resource

import nltk
>>> nltk.download('punkt')
[nltk_data] Error loading punkt: <urlopen error [SSL:
[nltk_data]     CERTIFICATE_VERIFY_FAILED] certificate verify failed:
[nltk_data]     unable to get local issuer certificate (_ssl.c:1000)>

So after digging around, I found this answer that gave me a hint on how to structure the files

Btw, I still can't get it to work with local files. Last thing it asked for LibreOffice. I installed it. Then got another error. will share when I am back home tonight.

ElishaKay commented 1 month ago

Welcome @Korayem ,

Perhaps a smoother path for you would be to run it through Docker Desktop.

Step 1: Install Docker Desktop

Step 2: Walk through this Tutorial

Korayem commented 1 month ago

Yeah, forgot to mention docker. I want to use it with my local files as mentioned, so I tried the new File Sharing >Virtual File shares feature in docker. I added the path to my local mac folder in env users/<username>/documents/folder. Also addedDOC_PATHtodocker-compose.yml` to carry the value into docker container.

I got an error PermissionError: [Errno 13] Permission denied: '/Users'

I still have to research how to fix this issue in Docker

ElishaKay commented 1 month ago

Almost there @Korayem The path to your documents should be somewhere within the code of the project That will enable you to skip the complexity of the Docker file sharing feature