Haste171 / langchain-chatbot

AI Chatbot for analyzing/extracting information from data in conversational format.
MIT License
401 stars 88 forks source link

error while installing via pip install -r requirements.txt #7

Closed lightningRalf closed 1 year ago

lightningRalf commented 1 year ago

Hi there, just wanted to try out. But got an error:

steps I took first:

  1. git clone
  2. python -m venv .venv
  3. ..venv\scripts\activate
  4. pip install -e

error:

INFO: pip is looking at multiple versions of uvicorn[standard] to determine which version is compatible with other requirements. This could take a while. Building wheels for collected packages: hnswlib, llama-index, sentence-transformers, validators 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 llama-index (pyproject.toml) ... done Created wheel for llama-index: filename=llama_index-0.5.12-py3-none-any.whl size=259557 sha256=93b2a10f6a813b94842c7472b4f6aa54892f8a7e17df707f5a1711038043ee39 Stored in directory: c:\users\mjpa\appdata\local\pip\cache\wheels\a3\75\79\8fae52aaa654990f1d1b7b5116732f9d417696216ba7971735 Building wheel for sentence-transformers (pyproject.toml) ... done Created wheel for sentence-transformers: filename=sentence_transformers-2.2.2-py3-none-any.whl size=125961 sha256=30f766c1a198d01b460c26d1c86df1b07351d97058b40d037d38a9f987325e6e Stored in directory: c:\users\mjpa\appdata\local\pip\cache\wheels\ff\27\bf\ffba8b318b02d7f691a57084ee154e26ed24d012b0c7805881 Building wheel for validators (pyproject.toml) ... done Created wheel for validators: filename=validators-0.20.0-py3-none-any.whl size=19590 sha256=84259d6d9e1c1808bb4c4d67462a7c9d24e6d6ae1de57c0423421bf7d85b0164 Stored in directory: c:\users\mjpa\appdata\local\pip\cache\wheels\82\35\dc\f88ec71edf2a5596bd72a8fa1b697277e0fcd3cde83048b8bf Successfully built llama-index sentence-transformers validators Failed to build hnswlib ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects

Which tools do I need to install [see screenshot]?

https://visualstudio.microsoft.com/visual-cpp-build-tools/ image

Haste171 commented 1 year ago

Let me look into this a bit more. Never happened to me or any other users before

Haste171 commented 1 year ago

Not sure why you are encountering this error, I just installed it through pip install -r requirements.txt which is in the documentation to a fresh virtual environment. I think it may have been the method in which you used pip to install the packages.

Another possibility is that you are using a version of Python that is not compatible. If you would like to use the same version i'm using I am on Python 3.10.8

lightningRalf commented 1 year ago

hm, Okey, I did a fresh install of .venv. I am running on Python 3.11.3 / did a pip install -r requirements.txt

Now running into this problem:

Building wheels for collected packages: hnswlib 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 Failed to build hnswlib ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects

[notice] A new release of pip available: 22.3.1 -> 23.1.2 [notice] To update, run: python.exe -m pip install --upgrade pip

So I still think it is the missing Microsft C++ Build tools, maybe every other developer out there has those already installed Oo

Haste171 commented 1 year ago

I believe we've fixed the issue please try again

0rangeAppl3 commented 1 year ago

I did get the same issue. Have you figured out how to fix? I have MSVC 2022 redist 14.31.31103 installed already.

hm, Okey, I did a fresh install of .venv. I am running on Python 3.11.3 / did a pip install -r requirements.txt

Now running into this problem:

Building wheels for collected packages: hnswlib 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 Failed to build hnswlib ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects

[notice] A new release of pip available: 22.3.1 -> 23.1.2 [notice] To update, run: python.exe -m pip install --upgrade pip

So I still think it is the missing Microsft C++ Build tools, maybe every other developer out there has those already installed Oo