Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1,994 changes: 997 additions & 997 deletions .github/workflows/01-PromptTemplate.ipynb

Large diffs are not rendered by default.

273 changes: 273 additions & 0 deletions 01-BASIC/01-Getting-Started-Windows.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "635d8ebb",
"metadata": {},
"source": [
"# Getting Started on Windows\n",
"\n",
"- Author: [Wooseok-Jeong](https://github.com/jeong-wooseok)\n",
"- Design: [Teddy](https://github.com/teddylee777)\n",
"- Peer Review: [Minji-Kang](https://github.com/r14minji), [Eun-Yoon](https://github.com/yuneun92)\n",
"- This is a part of [LangChain Open Tutorial](https://github.com/LangChain-OpenTutorial/LangChain-OpenTutorial)\n",
"\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain-academy/blob/main/module-4/sub-graph.ipynb) [![Open in LangChain Academy](https://cdn.prod.website-files.com/65b8cd72835ceeacd4449a53/66e9eba12c7b7688aa3dbb5e_LCA-badge-green.svg)](https://academy.langchain.com/courses/take/intro-to-langgraph/lessons/58239937-lesson-2-sub-graphs)\n",
"\n",
"## Overview\n",
"\n",
"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.\n",
"\n",
"### Table of Contents\n",
"\n",
"- [Overview](#overview)\n",
"- [Install git](#install-git)\n",
"- [Install pyenv](#install-pyenv)\n",
"- [Install Poetry](#install-poetry)\n",
"- [Install Visual Studio Code](#install-visual-studio-code)\n",
"- [Install Jupyter Extension](#install-jupyter-extension)\n",
"\n",
"### References\n",
"- [Download git](https://git-scm.com/download/win)\n",
"- [Download Visual Studio Code](https://code.visualstudio.com/download)\n",
"\n",
"----\n"
]
},
{
"cell_type": "markdown",
"id": "38fe3f6f",
"metadata": {},
"source": [
"## Install git\n",
"[Download git](https://git-scm.com/download/win)\n",
"\n",
"Download 64-bit Git for Windows Setup\n",
"\n",
"![git-download](./assets/01-follow-the-installation-video-windows-01.png)\n"
]
},
{
"cell_type": "markdown",
"id": "5189c83b",
"metadata": {},
"source": [
"Confirm options during installation and proceed\n",
"![](./assets/01-follow-the-installation-video-windows-02.png)"
]
},
{
"cell_type": "markdown",
"id": "a91429c1",
"metadata": {},
"source": [
"Click the Next button for all the rest to proceed with the installation.\n",
"![](./assets/01-follow-the-installation-video-windows-03.png)"
]
},
{
"cell_type": "markdown",
"id": "a49c86df",
"metadata": {},
"source": [
"Window key - PowerShell must be run as administrator\n",
"\n",
"Enter the command \"`git`\" and verify that the output looks like the image below\n",
"```Powershell\n",
"git\n",
"```\n",
"![](./assets/01-follow-the-installation-video-windows-04.png)\n"
]
},
{
"cell_type": "markdown",
"id": "459858ca",
"metadata": {},
"source": [
"- Apply PowerShell Policy \n",
"\n",
"First, **run **Windows PowerShell** as an \"administrator.\"</p> <p><br>\n",
"\n",
"Enter the following command to apply the policy\n",
"```Powershell\n",
"Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force\n",
"```\n",
"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."
]
},
{
"cell_type": "markdown",
"id": "8773e420",
"metadata": {},
"source": [
"## Install pyenv\n",
"Install pyenv before installing python. pyenv installs a virtualization environment to prevent conflicts between packages.\n",
"\n",
"```Powershell\n",
"git clone https://github.com/pyenv-win/pyenv-win.git \"$env:USERPROFILE\\.pyenv\"\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "bcc00279",
"metadata": {},
"source": [
"- Add environment variables\n",
"\n",
"Copy and paste the content below and run it\n",
"```Powershell\n",
"[System.Environment]::SetEnvironmentVariable('PYENV', $env:USERPROFILE + \"\\.pyenv\\pyenv-win\\\", \"User\")\n",
"[System.Environment]::SetEnvironmentVariable('PYENV_ROOT', $env:USERPROFILE + \"\\.pyenv\\pyenv-win\\\", \"User\")\n",
"[System.Environment]::SetEnvironmentVariable('PYENV_HOME', $env:USERPROFILE + \"\\.pyenv\\pyenv-win\\\", \"User\")\n",
"```\n",
"\n",
"Copy and paste the content below and run it\n",
"```powershell\n",
"[System.Environment]::SetEnvironmentVariable('PATH', $env:USERPROFILE + \"\\.pyenv\\pyenv-win\\bin;\" + $env:USERPROFILE + \"\\.pyenv\\pyenv-win\\shims;\" + [System.Environment]::GetEnvironmentVariable('PATH', \"User\"), \"User\")\n",
"```\n",
"\n",
"Shut down and rerun the current Windows PowerShell.\n",
"\n",
"Enter the following command to verify that it works.\n",
"```powershell\n",
"pyenv\n",
"```\n",
"![](./assets/01-follow-the-installation-video-windows-05.png)\n"
]
},
{
"cell_type": "markdown",
"id": "3abfe733",
"metadata": {},
"source": [
"- Install python\n",
"\n",
"Install Python version 3.11\n",
"```powershell\n",
"pyenv install 3.11\n",
"```\n",
"Setting 3.11 version of python as the default runtime\n",
"```powershell\n",
"pyenv global 3.11\n",
"```\n",
"Check your Python version\n",
"```powershell\n",
"python --version\n",
"```\n",
"Make sure you have version 3.11.9 installed (or 3.11.11 is fine too!)."
]
},
{
"cell_type": "markdown",
"id": "fe99bcaf",
"metadata": {},
"source": [
"## Install Poetry\n"
]
},
{
"cell_type": "markdown",
"id": "6eef27ed",
"metadata": {},
"source": [
"Run the command below to install the Poetry package management tool.\n",
"```powershell\n",
"pip3 install poetry\n",
"```\n",
"\n",
"(Note)\n",
"\n",
"- Link to the lab code: https://github.com/LangChain-OpenTutorial/LangChain-OpenTutorial.git\n",
"\n",
"Navigate to the Documents folder.\n",
"\n",
"```powershell\n",
"cd ~/Documents\n",
"```\n",
"\n",
"Execute the command below to get the source code.\n",
"```powershell\n",
"git clone https://github.com/LangChain-OpenTutorial/LangChain-OpenTutorial.git\n",
"```\n",
"\n",
"Execute the command below to navigate to the LangChain-OpenTutorial directory.\n",
"```powershell\n",
"cd LangChain-OpenTutorial\n",
"```\n",
"\n",
"Setting up a Python virtual environment\n",
"```powershell\n",
"poetry shell\n",
"```\n",
"Batch update Python packages\n",
"```powershell\n",
"poetry update\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "fb9bf1a4",
"metadata": {},
"source": [
"## Install Visual Studio Code\n"
]
},
{
"cell_type": "markdown",
"id": "efb44c79",
"metadata": {},
"source": [
"Download Visual Studio Code\n",
"\n",
"- Download link: https://code.visualstudio.com/download\n",
"\n",
"Install the downloaded Visual Studio Code (copy it to the Applications folder)\n",
"\n",
"Click 'install' of Jupyter on left Menu of extensions \n",
"![](./assets/01-follow-the-installation-video-windows-06.png)"
]
},
{
"cell_type": "markdown",
"id": "83d19633",
"metadata": {},
"source": [
"## Install Jupyter Extension\n",
"Search for \"python\" and install\n",
"![](./assets/01-follow-the-installation-video-windows-07.png)\n",
"\n",
"Search for \"jupyter\" and install\n",
"![](./assets/01-follow-the-installation-video-windows-08.png)\n",
"\n",
"Turn off and restart Visual Studio Code\n",
"\n",
"The installation is complete, and you can click the \"select kernel\" button in the top right corner.\n",
"\n",
"Click python environment - if you don't see the virtual environment you installed, turn off Visual Studio Code and restart it"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "langchain-opentutorial-wl7pahpy-py3.11",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading
Loading