private-gpt icon indicating copy to clipboard operation
private-gpt copied to clipboard

Unable to even run ingest.py

Open cyonghui81 opened this issue 2 years ago • 5 comments

I am running windows 10, have installed the necessary cmake and gnu that the git mentioned Python 3.11 version

However i am facing tons of issue installing privateGPT

I tried installing in a virtual environment with pip install -r requirements.txt

However when it try to run ingest.py, it gives me this error

C:\Users\User\Documents\Learning\privateGPT>python ingest.py Traceback (most recent call last): File "C:\Users\User\Documents\Learning\privateGPT\ingest.py", line 5, in from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv'

cyonghui81 avatar May 29 '23 07:05 cyonghui81

@cyonghui81 install dotenv : pip install python-dotenv C:\Users\User\Documents\Learning\privateGPT>pip install python-dotenv

aviggithub avatar May 29 '23 07:05 aviggithub

i tried "C:\Users\User\Documents\Learning\privateGPT>pip install python-dotenv" and i get Requirement already satisfied: python-dotenv in c:\users\basta\appdata\local\programs\python\python311\lib\site-packages (1.0.0) when i try run ingest.py i get the same error File "C:\Users\basta\GPT\privateGPT\ingest.py", line 5, in from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv'

i'm using Windows 11 and powershell in windows terminal

bstawy avatar May 30 '23 10:05 bstawy

You must always do your installs within the virtual environment or they will not be seen when you run the code later. So, you must be within the venv when you initially install the project, the requirements and the things missing from the requirements and when you execute either ingest.py or privategpt.py.

johnbrisbin avatar May 30 '23 22:05 johnbrisbin

You must always do your installs within the virtual environment or they will not be seen when you run the code later. So, you must be within the venv when you initially install the project, the requirements and the things missing from the requirements and when you execute either ingest.py or privategpt.py.

Can you elaborate on this?

Matus1976 avatar Jun 06 '23 00:06 Matus1976

You must always do your installs within the virtual environment or they will not be seen when you run the code later. So, you must be within the venv when you initially install the project, the requirements and the things missing from the requirements and when you execute either ingest.py or privategpt.py.

Can you elaborate on this?

You create a python virtual env. Then activate that virtual env. Then run your pip install.

python -m venv {name} source {name}/bin/activate

Now, run which python and you should be pointed to your virtual environment. Now you can pip install and the virtual environment will be updated.

JasonMaggard avatar Jun 06 '23 18:06 JasonMaggard