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

Inconsistent Installation with `poetry` for new version of PrivateGPT

Open Kingeng opened this issue 1 year ago • 7 comments

Issue:

I encountered an error during installation using poetry and the llms-ollama ui extras. The error message suggests ffmpy (version 0.3.1) might not support PEP 517 builds.

Here's the exact error:

- Installing ffmpy (0.3.1): Failed

 ChefBuildError

 Backend subprocess exited when trying to invoke get_requires_for_build_wheel
  
 /tmp/tmpevvmmq5q/.venv/lib64/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py': [Errno 2] No such file or directory

 at .venv/lib64/python3.11/site-packages/poetry/installation/chef.py:164 in _prepare

Workaround Attempted:

I attempted to verify the issue with pip wheel --no-cache-dir --use-pep517 "ffmpy (==0.3.1)" but encountered a different error after the workaround:

No module named 'build'

This error persists regardless of the command used with poetry.

Suggestion:

Considering the potential incompatibility between ffmpy and PEP 517 builds, could we explore switching the installation process to pip for a more reliable experience? This might simplify the installation for users encountering similar issues.

Additional Information:

Python version: 3.11 poetry version: 1.8.2 Operating System : Linux (Rocky 9)

Please Note:

  • I have followed the official installation documentation.
  • I have installed a clean version of Python 3.11. I appreciate your assistance in resolving this issue.

Kingeng avatar Mar 15 '24 12:03 Kingeng

yes, I have teh same problem. you must be successful on the first attempt, including every necessary module.

after initial poetry install, every further poetry install command results in the error: No module named 'build'

if more modules are neccessary, delete the environment and start anew

cognitivetech avatar Mar 15 '24 13:03 cognitivetech

I've ran into the same issue with No module named 'build' i've tried to install the modules separately but that didn't work.

@cognitivetech

yes, I have teh same problem. you must be successful on the first attempt, including every necessary module.

after initial poetry install, every further poetry install command results in the error: No module named 'build'

if more modules are neccessary, delete the environment and start anew

did you run all of the commands on a single line or independently?

needlzzz avatar Mar 15 '24 20:03 needlzzz

did you run all of the commands on a single line or independently?

all on a single line... they work together in a fresh environment.

cognitivetech avatar Mar 16 '24 22:03 cognitivetech

for those who want a temporary solution, I used this script here to setup and run the application:

#!/bin/bash

rm -rf .venv
python -m venv .venv
source .venv/bin/activate
pip install poetry
pip install ffmpy==0.3.1
poetry install --extras "ui llms-ollama embeddings-ollama vector-stores-qdrant"
PGPT_PROFILES=ollama make run

plinionaves avatar Mar 17 '24 01:03 plinionaves

for those who want a temporary solution, I used this script here to setup and run the application:

#!/bin/bash

rm -rf .venv
python -m venv .venv
source .venv/bin/activate
pip install poetry
pip install ffmpy==0.3.1
poetry install --extras "ui llms-ollama embeddings-ollama vector-stores-qdrant"
PGPT_PROFILES=ollama make run

This partially worked for me but i had to change it to python3.11:

#!/bin/bash

rm -rf .venv
pytho3.11n -m venv .venv
source .venv/bin/activate
pip install poetry
pip install ffmpy==0.3.1
poetry install --extras "ui llms-ollama embeddings-ollama vector-stores-qdrant"
PGPT_PROFILES=ollama make run

But now I'm running into this error: https://github.com/imartinez/privateGPT/issues/1334

needlzzz avatar Mar 17 '24 09:03 needlzzz

I had the same issue.

Running pyenv virtual env with python3.11.6

pip version: pip 24.0

I was able to solve by running:

python3 -m pip install build

I was able to run

PGPT_PROFILES=ollama make run

The ui has started. So it has fixed No module named 'build' but I didn't manage to run the app fully.

mark-kazakov avatar Mar 18 '24 08:03 mark-kazakov

I've run into the same problem.

I had to install ffmpy==0.3.1 and docx2txt manually.

You can get past the No module named 'build' message by first install build==1.0.3 and then running the poetry command again

so something like this

poetry install --extras "ui llms-ollama embeddings-ollama vector-stores-qdrant" 

# which failed with something like this:
# Note: This error originates from the build backend, and is likely not a problem with poetry but with docx2txt (0.8) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "docx2txt (==0.8)"'.

# Then I ran:
pip install docx2txt

# followed by 
pip install build==1.0.3

# followed by trying the poetry install again
poetry install --extras "ui llms-ollama embeddings-ollama vector-stores-qdrant"

# Resulting in a successful install

# Installing the current project: private-gpt (0.5.0)

PascalRoessnerDSA avatar Apr 29 '24 17:04 PascalRoessnerDSA