Rate This Document
Findability
Accuracy
Completeness
Readability

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.

  1. Obtain the LangChain source code.
    1
    git clone https://github.com/langchain-ai/langchain.git
    
  2. 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.

    1
    langchain_core-1.4.3-py3-none-any.whl
    
  3. 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.

    1
    langchain_text_splitters-1.1.2-py3-none-any.whl
    
  4. 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.

    1
    langchain_classic-1.0.7-py3-none-any.whl
    
  5. 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