Getting Started on Windows
Last updated
Last updated
Author: Wooseok-Jeong
Peer Review: Yun Eun, MinJi Kang
This is a part of LangChain Open Tutorial
This tutorial explains how to install the LangChain package on Windows environment. You can easily build a development environment by cloning the required github repository, batch installing the same packages as the author via pyenv, Poetry, installing Visual Studio Code and Jupyter Extension.
Download 64-bit Git for Windows Setup
Confirm options during installation and proceed
Click the Next button for all the rest to proceed with the installation.
Window key - PowerShell must be run as administrator
Enter the command "git
" and verify that the output looks like the image below
Apply PowerShell Policy
First, run Windows PowerShell as an "administrator."
Enter the following command to apply the policy
After the application is complete, turn Windows PowerShell off and then on. For the purposes of the following, "Run as administrator" when running Windows PowerShell.
Install pyenv before installing python. pyenv installs a virtualization environment to prevent conflicts between packages.
Add environment variables
Copy and paste the content below and run it
Copy and paste the content below and run it
Shut down and rerun the current Windows PowerShell.
Enter the following command to verify that it works.
Install python
Install Python version 3.11
Setting 3.11 version of python as the default runtime
Check your Python version
Make sure you have version 3.11.9 installed (or 3.11.11 is fine too!).
Run the command below to install the Poetry package management tool.
(Note)
Link to the lab code: https://github.com/LangChain-OpenTutorial/LangChain-OpenTutorial.git
Navigate to the Documents folder.
Execute the command below to get the source code.
Execute the command below to navigate to the LangChain-OpenTutorial directory.
Setting up a Python virtual environment
Batch update Python packages
Download Visual Studio Code
Download link: https://code.visualstudio.com/download
Install the downloaded Visual Studio Code (copy it to the Applications folder)
Click 'install' of Jupyter on left Menu of extensions
Search for "python" and install
Search for "jupyter" and install
Turn off and restart Visual Studio Code
The installation is complete, and you can click the "select kernel" button in the top right corner.
Click python environment - if you don't see the virtual environment you installed, turn off Visual Studio Code and restart it