[{"data":1,"prerenderedAt":168},["ShallowReactive",2],{"term-v\u002Fvirtual-environment":3,"related-v\u002Fvirtual-environment":152},{"id":4,"title":5,"acronym":6,"body":7,"category":133,"description":134,"difficulty":135,"extension":136,"letter":137,"meta":138,"navigation":93,"path":139,"related":140,"seo":146,"sitemap":147,"stem":150,"subcategory":6,"__hash__":151},"terms\u002Fterms\u002Fv\u002Fvirtual-environment.md","Virtual Environment",null,{"type":8,"value":9,"toc":127},"minimark",[10,15,19,23,39,43,116,120,123],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A virtual environment is an isolated bubble for your Python project's packages. Project A needs Django 3, Project B needs Django 5 — instead of them fighting, each gets its own bubble with its own set of packages. No conflicts, no mess.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25,26,30,31,34,35,38],{},"A virtual environment is an isolated Python environment that has its own interpreter and package installations, separate from the system Python and other projects. Created with ",[27,28,29],"code",{},"venv"," or tools like ",[27,32,33],{},"conda"," and ",[27,36,37],{},"uv",", it prevents dependency conflicts between projects.",[11,40,42],{"id":41},"show-me-the-code","Show Me The Code",[44,45,50],"pre",{"className":46,"code":47,"language":48,"meta":49,"style":49},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Create and activate a virtual environment\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate\n\n# Install packages inside the venv\npip install fastapi uvicorn\n","bash","",[27,51,52,61,78,88,95,101],{"__ignoreMap":49},[53,54,57],"span",{"class":55,"line":56},"line",1,[53,58,60],{"class":59},"sHwdD","# Create and activate a virtual environment\n",[53,62,64,68,72,75],{"class":55,"line":63},2,[53,65,67],{"class":66},"sBMFI","python",[53,69,71],{"class":70},"sfazB"," -m",[53,73,74],{"class":70}," venv",[53,76,77],{"class":70}," .venv\n",[53,79,81,85],{"class":55,"line":80},3,[53,82,84],{"class":83},"s2Zo4","source",[53,86,87],{"class":70}," .venv\u002Fbin\u002Factivate\n",[53,89,91],{"class":55,"line":90},4,[53,92,94],{"emptyLinePlaceholder":93},true,"\n",[53,96,98],{"class":55,"line":97},5,[53,99,100],{"class":59},"# Install packages inside the venv\n",[53,102,104,107,110,113],{"class":55,"line":103},6,[53,105,106],{"class":66},"pip",[53,108,109],{"class":70}," install",[53,111,112],{"class":70}," fastapi",[53,114,115],{"class":70}," uvicorn\n",[11,117,119],{"id":118},"when-youll-hear-this","When You'll Hear This",[16,121,122],{},"\"Always activate your virtual environment before installing packages.\" \u002F \"The CI uses a fresh virtual environment for every build.\"",[124,125,126],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":49,"searchDepth":63,"depth":63,"links":128},[129,130,131,132],{"id":13,"depth":63,"text":14},{"id":21,"depth":63,"text":22},{"id":41,"depth":63,"text":42},{"id":118,"depth":63,"text":119},"general","A virtual environment is an isolated bubble for your Python project's packages.","beginner","md","v",{},"\u002Fterms\u002Fv\u002Fvirtual-environment",[141,142,143,144,145],"Dependency","Package","node_modules","Lock File","Sandbox",{"title":5,"description":134},{"changefreq":148,"priority":149},"weekly",0.7,"terms\u002Fv\u002Fvirtual-environment","GM2zBNmt15yw60gy7GzgOMlPEpTksSfL7aczSU6V4Yw",[153,156,159,162,165],{"title":141,"path":154,"acronym":6,"category":133,"difficulty":135,"description":155},"\u002Fterms\u002Fd\u002Fdependency","A dependency is a package your project relies on to work. Your app depends on React to render UI, axios to make requests, and dotenv to read config.",{"title":144,"path":157,"acronym":6,"category":133,"difficulty":135,"description":158},"\u002Fterms\u002Fl\u002Flock-file","A lock file is a snapshot of the exact versions of every package your project is using right now.",{"title":143,"path":160,"acronym":6,"category":133,"difficulty":135,"description":161},"\u002Fterms\u002Fn\u002Fnode-modules","node_modules is the folder where npm dumps all the packages you install. It can grow to hundreds of megabytes instantly and contains thousands of files.",{"title":142,"path":163,"acronym":6,"category":133,"difficulty":135,"description":164},"\u002Fterms\u002Fp\u002Fpackage","A package is a bundle of code someone else wrote and published so you don't have to reinvent the wheel. Need to parse dates? There's a package for that.",{"title":145,"path":166,"acronym":6,"category":133,"difficulty":135,"description":167},"\u002Fterms\u002Fs\u002Fsandbox","A sandbox is a safe, isolated play area where code can run without affecting anything real.",1776518323065]