nlmatics / nlm-ingestor

This repo provides the server side code for llmsherpa API to connect. It includes parsers for various file formats.
https://www.nlmatics.com
Apache License 2.0
1.1k stars 158 forks source link

nlm-ingestor installation is failing due to lxml, pandas, xxhash #77

Open kcmuthyala opened 4 months ago

kcmuthyala commented 4 months ago

Hi, nlm-ingestor seems promising one but i couldn't able to move forward with the installation issue. I got the "ERROR: Failed to build installable wheels for some pyproject.toml based projects (lxml, pandas, xxhash)" when i try to install using the command "pip install nlm-ingestor".

I thought it may be due to dependencies lower versions issue and tried installation using constraints.txt by specifying latest versions (lxml>=5.2.1, pandas>=2.2.2) with the command "pip install -c constraints.txt nlm-ingestor". This also failed saying "nlm-ingestor 0.1.5 depends on pandas==1.2.4"

Please advise on this issue. Thanks in Advance !!

diganta037 commented 4 months ago

Getting the same issue. Actually I even tried to break it down step by step and even had it installed but now it asks for OPENAI_API_KEY as env variable while running the ingestion daemon. Seems like these packages are configured for python3.10 and not for the latest 3.12+

KOG-Nisse commented 4 months ago

Same issue, any updates?

I am running on windows 11

Reproduction: conda create -n sherpa python=3.11 conda activate sherpa java -jar /jars/tika-server-standard-nlm-modified-2.9.2_v1.jar pip install nlm-ingestor

Error output: ... building 'pandas._libs.algos' extension creating build\temp.win-amd64-cpython-311 creating build\temp.win-amd64-cpython-311\Release creating build\temp.win-amd64-cpython-311\Release\pandas creating build\temp.win-amd64-cpython-311\Release\pandas_libs cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DNPY_NO_DEPRECATED_API=0 -I.\pandas_libs -Ipandas/_libs/src/klib -IC:\Users\username\AppData\Local\Temp\pip-build-env-qknhqgkg\overlay\Lib\site-packages\numpy_core\include -IC:\Users\username\miniconda3\envs\sherpa\include -IC:\Users\username\miniconda3\envs\sherpa\Include -I\targets\x64 /Tcpandas_libs/algos.c /Fobuild\temp.win-amd64-cpython-311\Release\pandas_libs/algos.obj error: command 'cl.exe' failed: None [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pandas Building wheel for xxhash (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [16 lines of output] running bdist_wheel creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\xxhash copying xxhash__init__.py -> build\lib.win-amd64-cpython-311\xxhash running build_ext building '_xxhash' extension creating build\temp.win-amd64-cpython-311 creating build\temp.win-amd64-cpython-311\Release creating build\temp.win-amd64-cpython-311\Release\deps creating build\temp.win-amd64-cpython-311\Release\deps\xxhash creating build\temp.win-amd64-cpython-311\Release\src cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ideps/xxhash -IC:\Users\username\miniconda3\envs\sherpa\include -IC:\Users\username\miniconda3\envs\sherpa\Include -I\targets\x64 /Tcdeps/xxhash/xxhash.c /Fobuild\temp.win-amd64-cpython-311\Release\deps/xxhash/xxhash.obj error: command 'cl.exe' failed: None [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for xxhash Running setup.py clean for xxhash Failed to build lxml pandas xxhash ERROR: Could not build wheels for lxml, pandas, xxhash, which is required to install pyproject.toml-based projects

KOG-Nisse commented 4 months ago

this fixed the issue for me:

conda create -n sherpa39 python=3.9 conda activate sherpa39

pip install nlm-ingestor pip uninstall python-magic pip install python-magic-bin==0.4.14

kcmuthyala commented 3 months ago

Thank you KOG-Nisse. Its worked for me also with your suggestion. Now i am getting SSLCertVerificationError when i ran the nlm_ingestor.ingestion_daemon. I've opened new issue for this. https://github.com/nlmatics/nlm-ingestor/issues/81 Please respond if you encounter this ?

kcmuthyala commented 3 months ago

Getting the same issue. Actually I even tried to break it down step by step and even had it installed but now it asks for OPENAI_API_KEY as env variable while running the ingestion daemon. Seems like these packages are configured for python3.10 and not for the latest 3.12+

Thanks for your input. Its configured for lower python version. Now i am getting SSLCertVerificationError when i ran the nlm_ingestor.ingestion_daemon. I've opened new issue for this. https://github.com/nlmatics/nlm-ingestor/issues/81 Please respond if you encounter this ?