localGPT icon indicating copy to clipboard operation
localGPT copied to clipboard

a question about intstall localgpt

Open frabob2017 opened this issue 1 year ago • 5 comments

Hello I follow this video https://www.youtube.com/watch?v=lbFmceo4D5E&t=201s to install localgpt, when I use command python -m install -r requriements.txt, I have such error. Do I need to install LLAMA2 seperately. I think LocalGPT requirements/txt will include all packages needed? Thank you.

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for llama-cpp-python Building wheel for auto-gptq (setup.py) ... done Created wheel for auto-gptq: filename=auto_gptq-0.2.2-py3-none-any.whl size=58299 sha256=2f7407435a32c12e5417f8401d63ddbf28351bc9d99a53f44754f3f38884a667 Stored in directory: c:\users\yxcai\appdata\local\pip\cache\wheels\10\d9\39\1eb550a301ea0881df5be887242f590198bcb94845854e1c35 Building wheel for sentence-transformers (setup.py) ... done Created wheel for sentence-transformers: filename=sentence_transformers-2.2.2-py3-none-any.whl size=125960 sha256=ff5a5d0c5400f03d66272c21f9377091463a966eb65401eb7306452dbaca0e66
Stored in directory: c:\users\yxcai\appdata\local\pip\cache\wheels\ff\27\bf\ffba8b318b02d7f691a57084ee154e26ed24d012b0c7805881 Building wheel for docx2txt (setup.py) ... done Created wheel for docx2txt: filename=docx2txt-0.8-py3-none-any.whl size=3973 sha256=fbcc1531d06386a3ec3de9adfaf34b04dff2d52ed2fe7f734140eb5f52ca0a74 Stored in directory: c:\users\yxcai\appdata\local\pip\cache\wheels\0f\0e\7a\3094a4ceefe657bff7e12dd9592a9d5b6487ef4338ace0afa6 Building wheel for htbuilder (setup.py) ... done Created wheel for htbuilder: filename=htbuilder-0.6.1-py3-none-any.whl size=12481 sha256=591ca4de5e360cf877555f34d72eb9b21691ce8ab6d773d302e5eef902629029 Stored in directory: c:\users\yxcai\appdata\local\pip\cache\wheels\e2\b3\8b\3178ccf0d59f158ee457e114026064d78b2c91bbf29f3d87b6 Building wheel for hnswlib (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for hnswlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [5 lines of output] running bdist_wheel running build running build_ext building 'hnswlib' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for hnswlib Building wheel for st-annotated-text (setup.py) ... done Created wheel for st-annotated-text: filename=st_annotated_text-4.0.0-py3-none-any.whl size=8927 sha256=bfcd8af20d3847fc5bb52ce4dfe7edcca311193aadf948191a9601e96a36dbaf Stored in directory: c:\users\yxcai\appdata\local\pip\cache\wheels\6b\6a\df\1eda8d742a9094f5694398f5a81a4eb8297297b2cf9f027342 Successfully built auto-gptq sentence-transformers docx2txt htbuilder st-annotated-text Failed to build llama-cpp-python hnswlib ERROR: Could not build wheels for llama-cpp-python, hnswlib, which is required to install pyproject.toml-based projects

frabob2017 avatar Aug 26 '23 21:08 frabob2017

It looks that I need to install "Microsoft C++ Build Tools" https://github.com/imartinez/privateGPT/issues/445

frabob2017 avatar Aug 26 '23 21:08 frabob2017

Oh I had a similar error. I am running on macos though.

Installing visual studio and xcode and then restarting my system did the trick for me.

Satyam7166-tech avatar Aug 28 '23 10:08 Satyam7166-tech

I'm getting this error too on windows. Tried to install visual studio 2022, and build tools for C++. Restarted machine, but still get the same error after running python -m pip install -r requirements.txt

rpuls avatar Aug 29 '23 11:08 rpuls

I have not figured it out yet. I also use Windows.

frabob2017 avatar Aug 29 '23 16:08 frabob2017

I have not figured it out yet. I also use Windows.

Hi there! I figured it out eventually. Im on windows 11 btw. So i think the C++ build tools 2019 installation did the trick for me. However, I found an easy way to get everything needed installed. So it seems like text-generation-webui and stablediffusion and this localGPT all depend on the same kind of development environment. I found an app called "pinokio" that can install all these ai tools/app AND all their required components.... so i downloaded pinokio and had it install text-generation-webui (oobabooga_windows) - it took a while (an hour or so) and i noticed that it installed the C++ 2019 build tools, and some other things.

I was able to run text-generation-webui within the pinokio app, but it turned out that I was also able to run the python -m pip install -r requirements.txt in the localGPT project since. So i guess pinokio installed all the needed things.

Maybe try just installing C++ build tools 2019 through the visual studio installer, if still not working, I recommend trying: https://pinokio.computer/

rpuls avatar Aug 29 '23 17:08 rpuls