Hello everyone,
I’m currently facing difficulty installing LangChain on Streamlit.
When I look into the logs, the issue comes from orjson package, which is required by LangSmith, which is required by Langchain. Here’s the log:
Collecting orjson<4.0.0,>=3.9.14 (from langsmith<0.2.0,>=0.1.17->langchain==0.2.12->-r /mount/src/langchain-ask-youtube/requirements.txt (line 1))
Downloading orjson-3.10.7.tar.gz (5.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.1/5.1 MB 171.2 MB/s eta 0:00:00[2024-08-09 01:36:25.410350]
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Checking for Rust toolchain....
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
The error seems to happen because orjson requires Cargo to build.
Does anyone have the same issue? My application runs fine before, it’s only after I reboot the app this error arise.
Also, here’s my requirements.txt if needed:
langchain == 0.2.12
langchain_community==0.2.11
langchain_core==0.2.27
langchain-openai==0.1.7
streamlit==1.37.1
chromadb==0.4.18
youtube-transcript-api==0.6.2
Thanks in advance