In this chapter, we will learn how you can install LangChain on your computer. We will use a virtual environment to keep your main installation clean. Get started by creating a virtual environment:
# Change to home directory. You can modify it
cd ~/
# Create the project directory
mkdir langchain-tutorial
# Go to the directory
cd langchain-tutorial
# Create the virtual environment. Feel free to change
# Python version if it differs on your system
virtualenv -p python3.11 venv
# Activate the virtual environment
source venv/bin/activate
Install LangChain
Once the project directory is created and the virtual environment is activated, install LangChain by running:
pip install langchain
That's it. We have installed the initial requirements and now we are ready to move to the next step. In the next chapter, we will be using OpenAI API to embed our context and then we will make OpenAI respond to our questions based on our provided information.
Latest comments (0)