noahc1510 / trt-llm-rag-linux

A developer reference project for creating Retrieval Augmented Generation (RAG) chatbots on Linux using TensorRT-LLM
Other
19 stars 5 forks source link

Getting ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects #6

Closed digitalmonkey closed 6 months ago

digitalmonkey commented 6 months ago

I'm getting the error in the subject line after calling: pip install -r requirements.txt

I tried upgrading pip with: pip install --upgrade pip, and tried changing to a newer version of numpy, to no avail.

Here's the full readout: ` CCompilerOpt.cache_flush[809] : write cache to path -> /tmp/pip-install-u6hgpgl2/numpy_613d13a15d734984a5282e2c36ed6c1f/build/temp.linux-x86_64-3.10/ccompiler_opt_cache_clib.py error: Command "/home/vng/anaconda3/envs/trt-llm-rag-linux/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -D_GNU_SOURCE=1 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/vng/anaconda3/envs/trt-llm-rag-linux/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/vng/anaconda3/envs/trt-llm-rag-linux/include -fPIC -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild/src.linux-x86_64-3.10/numpy/core/src/common -Ibuild/src.linux-x86_64-3.10/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.linux-x86_64-3.10/numpy/core/include/numpy -Ibuild/src.linux-x86_64-3.10/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/home/vng/anaconda3/envs/trt-llm-rag-linux/lib/jvm/languages/python/include/python3.10 -Ibuild/src.linux-x86_64-3.10/numpy/core/src/common -Ibuild/src.linux-x86_64-3.10/numpy/core/src/npymath -c build/src.linux-x86_64-3.10/numpy/core/src/multiarray/arraytypes.c -o build/temp.linux-x86_64-3.10/build/src.linux-x86_64-3.10/numpy/core/src/multiarray/arraytypes.o -MMD -MF build/temp.linux-x86_64-3.10/build/src.linux-x86_64-3.10/numpy/core/src/multiarray/arraytypes.o.d -msse -msse2 -msse3" failed with exit status 1 [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for numpy
  Failed to build numpy
  ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. `

digitalmonkey commented 6 months ago

Ok, I was able to resolve the issue by using the miniconda environment instead of the bigger Anaconda installation. It's likely the latter brings in extra packages that conflicts with the process. Starting with the more minimalist miniconda and explicitly adding in the packages worked for me.