Source Code Compilation and Build
Obtain the langchain-core source code, build a wheel from the source code, and install the local build product. Build sequence: langchain-core, langchain-text-splitters, and LangChain.
- Obtain the LangChain source code.
1git clone https://github.com/langchain-ai/langchain.git
- Build the langchain-core wheel from the source code.
1 2
cd langchain/libs/core python3 -m build --wheel --outdir dist
The following is an example of the build product.
1langchain_core-1.4.3-py3-none-any.whl
- Build the langchain-text-splitters wheel from the source code.
1 2
cd ../text-splitters python3 -m build --wheel --outdir dist
The following is an example of the build product.
1langchain_text_splitters-1.1.2-py3-none-any.whl
- Build the langchain wheel from the source code.
1 2
cd ../langchain python3 -m build --wheel --outdir dist
The following is an example of the build product.
1langchain_classic-1.0.7-py3-none-any.whl
- Return to langchain/libs to install the local build product.
1 2 3 4
cd ../ python3 -m pip install --force-reinstall core/dist/langchain_core-1.4.3-py3-none-any.whl python3 -m pip install --force-reinstall text-splitters/dist/langchain_text_splitters-1.1.2-py3-none-any.whl python3 -m pip install --force-reinstall langchain/dist/langchain_classic-1.0.7-py3-none-any.whl
Parent topic: Developer Guide