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

No module named 'private_gpt'

Open anamariaUIC opened this issue 1 year ago • 2 comments

Hello,

Can you please help me resolve this issue:

a@login-2[SABER]: ~/genai/llama_test/privateGPT $ ls CHANGELOG.md Dockerfile.external LICENSE models pyproject.toml settings-docker.yaml settings-sagemaker.yaml settings.yaml CITATION.cff Dockerfile.local local_data poetry.lock README.md settings-local.yaml settings-test.yaml tests docker-compose.yaml fern Makefile private_gpt scripts settings-mock.yaml settings-vllm.yaml version.txt a@login-2[SABER]: ~/genai/llama_test/privateGPT $ conda activate privategpt (privategpt) anamaria@login-2[SABER]: ~/genai/llama_test/privateGPT $ poetry run python scripts/setup Traceback (most recent call last): File "/home/anamaria/genai/llama_test/privateGPT/scripts/setup", line 8, in from private_gpt.paths import models_path, models_cache_path ModuleNotFoundError: No module named 'private_gpt' (privategpt) anamaria@login-2[SABER]: ~/genai/llama_test/privateGPT $

anamariaUIC avatar Jan 29 '24 19:01 anamariaUIC

Do provide details which the instructions ask, no OS info does not help you have to set up the virtual env assuming it is ubuntu below steps should work to setup the env and then this https://docs.privategpt.dev/installation

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.profile
pyenv install 3.11
 source /home/hnsi/.cache/pypoetry/virtualenvs/private-gpt-35DaHCIE-py3.11/bin/activate
pyenv local 3.11

sandyis avatar Jan 31 '24 02:01 sandyis

So i am using Ubuntu on WSL2 and i had the same error, i tried setting up the pyenv, but got this error msg.

pyenv install 3.11
Downloading Python-3.11.8.tar.xz...
-> https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tar.xz
Installing Python-3.11.8...

BUILD FAILED (Ubuntu 22.04 using python-build 2.3.36-16-g21c2a3dd)

Inspect or clean up the working tree at /tmp/python-build.20240305082136.868
Results logged to /tmp/python-build.20240305082136.868.log

Last 10 log lines:
  File "/tmp/python-build.20240305082136.868/Python-3.11.8/Lib/ensurepip/__init__.py", line 202, in _bootstrap
    return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/python-build.20240305082136.868/Python-3.11.8/Lib/ensurepip/__init__.py", line 103, in _run_pip
    return subprocess.run(cmd, check=True).returncode
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/python-build.20240305082136.868/Python-3.11.8/Lib/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/tmp/python-build.20240305082136.868/Python-3.11.8/python', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmp0ezl6w3s/setuptools-65.5.0-py3-none-any.whl\', \'/tmp/tmp0ezl6w3s/pip-24.0-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmp0ezl6w3s\', \'--root\', \'/\', \'--upgrade\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
make: *** [Makefile:1865: install] Error 1

TobiasJu avatar Mar 05 '24 07:03 TobiasJu