Skip to content

Commit b135073

Browse files
authored
fix(genapi): Adding dependencies requirements for MacOS and Debian/Ubuntu
Adding dependencies requirements for MacOS and Debian/Ubuntu, and fixing python packages version.
1 parent eab3bfe commit b135073

File tree

1 file changed

+18
-3
lines changed
  • tutorials/how-to-implement-rag-generativeapis

1 file changed

+18
-3
lines changed

tutorials/how-to-implement-rag-generativeapis/index.mdx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,31 @@ In this tutorial, you will learn how to implement RAG using LangChain, a leading
3434

3535
### Install required packages
3636

37-
Run the following command to install the required Python packages:
37+
#### MacOS
38+
Run the following command to install the required MacOS packages to analyze PDF files and connect to PostgreSQL using Python:
39+
40+
```sh
41+
brew install libmagic poppler tesseract qpdf libpq python3-dev
42+
```
43+
44+
#### Debian/Ubuntu
45+
Run the following command to install the required Debian/Ubuntu packages to analyze PDF files and connect to PostgreSQL using Python:
46+
47+
```sh
48+
sudo apt-get install libmagic-dev tesseract-ocr poppler-utils qpdf libpq-dev python3-dev build-essential python3-opencv
49+
```
50+
51+
#### All OS
52+
Once you have installed prerequisites for your OS, run the following command to install the required Python packages:
3853

3954
```sh
4055
pip install langchain langchainhub langchain_openai langchain_community langchain_postgres unstructured "unstructured[pdf]" libmagic python-dotenv psycopg2 boto3
4156
```
4257

43-
If you are on MacOS, run also the following command to install dependencies required by the `unstructured` package:
58+
This command will install the latest version for all packages. If you want to limit dependencies conflicts risks, you can install the following specific versions instead:
4459

4560
```sh
46-
brew install libmagic poppler tesseract qpdf
61+
pip install langchain==0.3.9 langchainhub==0.1.21 langchain-openai==0.2.10 langchain-community==0.3.8 langchain-postgres==0.0.12 unstructured==0.16.8 "unstructured[pdf]" libmagic==1.0 python-dotenv==1.0.1 psycopg2==2.9.10 boto3==1.35.71
4762
```
4863

4964
### Create a .env file

0 commit comments

Comments
 (0)