<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>pip &#8211; cybogeek.com</title>
	<atom:link href="https://cybogeek.com/tag/pip/feed/" rel="self" type="application/rss+xml" />
	<link>https://cybogeek.com</link>
	<description>Explore, Develop, Safeguard</description>
	<lastBuildDate>Mon, 04 May 2026 15:12:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://cybogeek.com/wp-content/uploads/2025/09/cropped-cybogeek-ico-1x-32x32.png</url>
	<title>pip &#8211; cybogeek.com</title>
	<link>https://cybogeek.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Fix “pip Is Not Recognized” in Windows</title>
		<link>https://cybogeek.com/how-to-fix-pip-is-not-recognized-in-windows/</link>
		
		<dc:creator><![CDATA[Sukanto]]></dc:creator>
		<pubDate>Mon, 04 May 2026 15:12:15 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Command Prompt]]></category>
		<category><![CDATA[package installation]]></category>
		<category><![CDATA[PATH]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Python beginner]]></category>
		<category><![CDATA[Python errors]]></category>
		<category><![CDATA[Python setup]]></category>
		<category><![CDATA[Python tutorial]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://cybogeek.com/?p=471</guid>

					<description><![CDATA[If you are working with Python on Windows and suddenly see an error saying “pip is not recognized as an internal or external command”, it can be frustrating—especially when all you want to do is install a package and start coding. This issue is extremely common among beginners and even appears for users who already [&#8230;]]]></description>
										<content:encoded><![CDATA[<p data-start="360" data-end="703">If you are working with Python on Windows and suddenly see an error saying <strong data-start="435" data-end="497">“pip is not recognized as an internal or external command”</strong>, it can be frustrating—especially when all you want to do is install a package and start coding. This issue is extremely common among beginners and even appears for users who already have Python installed.</p>
<p data-start="705" data-end="982">The good news is that this problem is almost never serious. In most cases, it happens because Windows cannot locate the <strong data-start="825" data-end="832">pip</strong> command, not because pip is broken or missing forever. Once you understand why the error appears, fixing it becomes a logical and repeatable process.</p>
<p data-start="984" data-end="1167">This guide explains <strong data-start="1004" data-end="1037">what the error actually means</strong>, <strong data-start="1039" data-end="1057">why it happens</strong>, and <strong data-start="1063" data-end="1093">how to fix it step by step</strong>, even if you are completely new to Python and Windows command-line tools.</p>
<hr data-start="1169" data-end="1172" />
<h3 data-section-id="1hrlrfr" data-start="1174" data-end="1220">What “pip Is Not Recognized” Actually Means</h3>
<p data-start="1222" data-end="1320">When Windows displays this error, it is not saying that pip does not exist. Instead, it is saying:</p>
<blockquote data-start="1322" data-end="1360">
<p data-start="1324" data-end="1360">“I don’t know where pip is located.”</p>
</blockquote>
<p data-start="1362" data-end="1620">On Windows, commands like <code data-start="1388" data-end="1393">pip</code>, <code data-start="1395" data-end="1403">python</code>, or <code data-start="1408" data-end="1413">git</code> only work when their locations are listed in something called the <strong data-start="1480" data-end="1509">PATH environment variable</strong>. PATH is simply a list of folders that Windows checks when you type a command in Command Prompt or PowerShell.</p>
<p data-start="1362" data-end="1620"><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-473" src="https://cybogeek.com/wp-content/uploads/2026/05/pip-not-recognised-fix-it-step-by-step.jpeg" alt="pip-not recognised fix it step by step" width="1312" height="736" srcset="https://cybogeek.com/wp-content/uploads/2026/05/pip-not-recognised-fix-it-step-by-step.jpeg 1312w, https://cybogeek.com/wp-content/uploads/2026/05/pip-not-recognised-fix-it-step-by-step-300x168.jpeg 300w, https://cybogeek.com/wp-content/uploads/2026/05/pip-not-recognised-fix-it-step-by-step-1024x574.jpeg 1024w, https://cybogeek.com/wp-content/uploads/2026/05/pip-not-recognised-fix-it-step-by-step-768x431.jpeg 768w, https://cybogeek.com/wp-content/uploads/2026/05/pip-not-recognised-fix-it-step-by-step-800x450.jpeg 800w" sizes="(max-width: 1312px) 100vw, 1312px" /></p>
<p data-start="1622" data-end="1744">If the folder containing <code data-start="1647" data-end="1656">pip.exe</code> is not listed in PATH, Windows will fail to find it—even if pip is correctly installed.</p>
<p data-start="1746" data-end="1781">This is why the error is so common:</p>
<ul data-start="1782" data-end="1872">
<li data-section-id="1neme5q" data-start="1782" data-end="1807">Python may be installed</li>
<li data-section-id="1402kgj" data-start="1808" data-end="1830">pip may be installed</li>
<li data-section-id="ju7j9s" data-start="1831" data-end="1872">but Windows does not know where to look</li>
</ul>
<p data-start="1874" data-end="1951">Understanding this concept makes the rest of the fixes much easier to follow.</p>
<hr data-start="1953" data-end="1956" />
<h3 data-section-id="1flx1qj" data-start="1958" data-end="2005">Why This Problem Happens So Often on Windows</h3>
<p data-start="2007" data-end="2270">Unlike some operating systems where tools are automatically available, Windows relies heavily on PATH configuration. During Python installation, there is a small checkbox called <strong data-start="2185" data-end="2209">“Add Python to PATH”</strong>. If this is skipped—even once—pip commands may stop working.</p>
<p data-start="2007" data-end="2270"><img decoding="async" class="aligncenter size-full wp-image-474" src="https://cybogeek.com/wp-content/uploads/2026/05/fix-pip-error.jpg" alt="fix-pip-error" width="711" height="400" srcset="https://cybogeek.com/wp-content/uploads/2026/05/fix-pip-error.jpg 711w, https://cybogeek.com/wp-content/uploads/2026/05/fix-pip-error-300x169.jpg 300w" sizes="(max-width: 711px) 100vw, 711px" /></p>
<p data-start="2272" data-end="2301"><strong>Other common reasons include:</strong></p>
<ul data-start="2302" data-end="2498">
<li data-section-id="4zuyf4" data-start="2302" data-end="2347">Python was installed from a custom location</li>
<li data-section-id="1ds6awu" data-start="2348" data-end="2391">More than one Python version is installed</li>
<li data-section-id="1rq7br5" data-start="2392" data-end="2441">The terminal was opened before PATH was updated</li>
<li data-section-id="9588ca" data-start="2442" data-end="2498">Python was partially installed or upgraded incorrectly</li>
</ul>
<p data-start="2500" data-end="2594">None of these mean your system is broken. They simply mean Windows needs clearer instructions.</p>
<hr data-start="2596" data-end="2599" />
<h3 data-section-id="1jv3n61" data-start="2601" data-end="2644">Step 1: Confirm That Python Is Installed</h3>
<p data-start="2646" data-end="2700">Before fixing pip, make sure Python itself is working.</p>
<p data-start="2702" data-end="2755">Open <strong data-start="2707" data-end="2725">Command Prompt</strong> or <strong data-start="2729" data-end="2743">PowerShell</strong>, then type:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>python --version</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<h4 data-section-id="iohyqa" data-start="2783" data-end="2809">What the result means:</h4>
<ul data-start="2810" data-end="2940">
<li data-section-id="1otskgj" data-start="2810" data-end="2875"><strong data-start="2812" data-end="2838">Version number appears</strong> → Python is installed and responding</li>
<li data-section-id="a8u7uy" data-start="2876" data-end="2940"><strong data-start="2878" data-end="2899">Command not found</strong> → Python is missing or not added to PATH</li>
</ul>
<p data-start="2942" data-end="3105">If Python itself is not recognized, reinstall Python first and make sure PATH is enabled during setup. Fixing pip without Python working correctly is not possible.</p>
<hr data-start="3107" data-end="3110" />
<h3 data-section-id="1n657nc" data-start="3112" data-end="3160">Step 2: Try Using pip Through Python Directly</h3>
<p data-start="3162" data-end="3235">Even if the <code data-start="3174" data-end="3179">pip</code> Command fails, pip may still exist and work internally.</p>
<p data-start="3237" data-end="3262">Try this command instead:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>python -m pip --version</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="3297" data-end="3427">If this prints a version number, pip <strong data-start="3334" data-end="3365">is installed and functional</strong>. The issue is only with the shortcut command, not pip itself.</p>
<p data-start="3297" data-end="3427"><img decoding="async" class="aligncenter size-full wp-image-475" src="https://cybogeek.com/wp-content/uploads/2026/05/pip-fix-step.jpg" alt="pip-fix-step" width="711" height="400" srcset="https://cybogeek.com/wp-content/uploads/2026/05/pip-fix-step.jpg 711w, https://cybogeek.com/wp-content/uploads/2026/05/pip-fix-step-300x169.jpg 300w" sizes="(max-width: 711px) 100vw, 711px" /></p>
<p data-start="3429" data-end="3455"><strong>This method works because:</strong></p>
<ul data-start="3456" data-end="3556">
<li data-section-id="1j5j1qp" data-start="3456" data-end="3495">Python directly loads pip as a module</li>
<li data-section-id="1skkb8" data-start="3496" data-end="3514">PATH is bypassed</li>
<li data-section-id="i8y4l0" data-start="3515" data-end="3556">Windows does not need to find <code data-start="3547" data-end="3556">pip.exe</code></li>
</ul>
<p data-start="3558" data-end="3597">You can also install packages this way:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>python -m pip install requests</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="3639" data-end="3752">Many experienced developers prefer this approach because it is more reliable when multiple Python versions exist.</p>
<hr data-start="3754" data-end="3757" />
<h2 data-section-id="1bxmqjp" data-start="3759" data-end="3807">Step 3: Understand Where pip Lives on Windows</h2>
<p data-start="3809" data-end="3916">On Windows, pip is stored inside a folder called <strong data-start="3858" data-end="3869">Scripts</strong>, which lives inside the main Python directory.</p>
<p data-start="3918" data-end="3951">Typical locations look like this:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>C:\Users\YourName\AppData\Local\Programs\Python\Python3xx\Scripts</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="4028" data-end="4030">or</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>C:\Python3xx\Scripts</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="4062" data-end="4097">Inside this folder, you should see:</p>
<ul data-start="4098" data-end="4144">
<li data-section-id="16tvudz" data-start="4098" data-end="4109"><code data-start="4100" data-end="4109">pip.exe</code></li>
<li data-section-id="1widm1w" data-start="4110" data-end="4122"><code data-start="4112" data-end="4122">pip3.exe</code></li>
<li data-section-id="8f7bu0" data-start="4123" data-end="4144">other related tools</li>
</ul>
<p data-start="4146" data-end="4236">If Windows does not know about this folder, it cannot run pip—even though the file exists.</p>
<hr data-start="4238" data-end="4241" />
<h3 data-section-id="1g6wqmq" data-start="4243" data-end="4297">Step 4: Add Python and Scripts to the PATH Variable</h3>
<p data-start="4299" data-end="4346">This is the most common and most effective fix.</p>
<h4 data-section-id="15c4a8k" data-start="4348" data-end="4388">How to add PATH correctly on Windows</h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-476" src="https://cybogeek.com/wp-content/uploads/2026/05/system-properties.png" alt="system-properties" width="414" height="468" srcset="https://cybogeek.com/wp-content/uploads/2026/05/system-properties.png 414w, https://cybogeek.com/wp-content/uploads/2026/05/system-properties-265x300.png 265w" sizes="(max-width: 414px) 100vw, 414px" /></p>
<ol data-start="4390" data-end="4731">
<li data-section-id="1fwn6pw" data-start="4390" data-end="4416">Open the <strong data-start="4402" data-end="4416">Start Menu</strong></li>
<li data-section-id="t3338s" data-start="4417" data-end="4456">Search for <strong data-start="4431" data-end="4456">Environment Variables</strong></li>
<li data-section-id="lfq28m" data-start="4457" data-end="4507">Click <strong data-start="4466" data-end="4507">Edit the system environment variables</strong></li>
<li data-section-id="5io99z" data-start="4508" data-end="4543">Select <strong data-start="4518" data-end="4543">Environment Variables</strong></li>
<li data-section-id="1ic13k2" data-start="4544" data-end="4588">Under <strong data-start="4553" data-end="4573">System variables</strong>, find <strong data-start="4580" data-end="4588">Path<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-477" src="https://cybogeek.com/wp-content/uploads/2026/05/environment-variables.png" alt="environment-variables" width="613" height="579" srcset="https://cybogeek.com/wp-content/uploads/2026/05/environment-variables.png 613w, https://cybogeek.com/wp-content/uploads/2026/05/environment-variables-300x283.png 300w" sizes="(max-width: 613px) 100vw, 613px" /></strong></li>
<li data-section-id="zw9h67" data-start="4589" data-end="4606">Click <strong data-start="4598" data-end="4606">Edit</strong></li>
<li data-section-id="k1ia8g" data-start="4607" data-end="4677">Add:
<ul data-start="4618" data-end="4677">
<li data-section-id="bzhwt4" data-start="4618" data-end="4642">The main Python folder</li>
<li data-section-id="1ngf5gv" data-start="4646" data-end="4677">The Python <strong data-start="4659" data-end="4670">Scripts</strong> folder<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-478" src="https://cybogeek.com/wp-content/uploads/2026/05/save-edit-environment-variable.png" alt="save-edit-environment-variable" width="516" height="490" srcset="https://cybogeek.com/wp-content/uploads/2026/05/save-edit-environment-variable.png 516w, https://cybogeek.com/wp-content/uploads/2026/05/save-edit-environment-variable-300x285.png 300w" sizes="(max-width: 516px) 100vw, 516px" /></li>
</ul>
</li>
<li data-section-id="o0jpza" data-start="4678" data-end="4708">Click <strong data-start="4687" data-end="4693">OK</strong> on all windows</li>
<li data-section-id="1bkdcj6" data-start="4709" data-end="4731">Close all terminals</li>
</ol>
<p data-start="4733" data-end="4803">After doing this, Windows will know where to find both Python and pip.</p>
<p data-start="4733" data-end="4803">
<h4 data-section-id="lg6pm8" data-start="4805" data-end="4823">Important note</h4>
<p data-start="4824" data-end="4926">Always open a <strong data-start="4838" data-end="4861">new terminal window</strong> after changing PATH. Existing terminals will not see the update.</p>
<p data-start="4824" data-end="4926">
<hr data-start="4928" data-end="4931" />
<h3 data-section-id="13yb922" data-start="4933" data-end="4978">Step 5: Test pip Again After Updating PATH</h3>
<p data-start="4980" data-end="5015">Open a new Command Prompt and type:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>pip --version</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="5040" data-end="5118">If PATH is set correctly, Windows should now find pip and display its version.</p>
<p data-start="5120" data-end="5202">If it still does not work, do not panic. There are still reliable fixes available.</p>
<hr data-start="5204" data-end="5207" />
<h3 data-section-id="fcgung" data-start="5209" data-end="5268">Step 6: Reinstall Python the Right Way (Recommended Fix)</h3>
<p data-start="5270" data-end="5383">If your setup feels messy or inconsistent, reinstalling Python is often faster than troubleshooting every detail.</p>
<h4 data-section-id="1e6cxbz" data-start="5385" data-end="5424">During installation, make sure you:</h4>
<ul data-start="5425" data-end="5577">
<li data-section-id="1vft6ml" data-start="5425" data-end="5455">Check <strong data-start="5433" data-end="5455">Add Python to PATH</strong></li>
<li data-section-id="fitfmu" data-start="5456" data-end="5505">Ensure <strong data-start="5465" data-end="5472">pip</strong> is selected in optional features</li>
<li data-section-id="170vrrs" data-start="5506" data-end="5577">Use the default installation location unless you have a reason not to</li>
</ul>
<p data-start="5579" data-end="5598">After installation:</p>
<ul data-start="5599" data-end="5709">
<li data-section-id="1h4dhb1" data-start="5599" data-end="5636">Restart your computer (recommended)</li>
<li data-section-id="gpt945" data-start="5637" data-end="5658">Open a new terminal</li>
<li data-section-id="n2rv09" data-start="5659" data-end="5709">Test both <code data-start="5671" data-end="5689">python --version</code> and <code data-start="5694" data-end="5709">pip --version</code></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-479" src="https://cybogeek.com/wp-content/uploads/2026/05/python-py-version-differ.png" alt="python-py-version-differ" width="751" height="194" srcset="https://cybogeek.com/wp-content/uploads/2026/05/python-py-version-differ.png 751w, https://cybogeek.com/wp-content/uploads/2026/05/python-py-version-differ-300x77.png 300w" sizes="(max-width: 751px) 100vw, 751px" /></p>
<p data-start="5711" data-end="5774">A clean reinstall resolves most PATH-related issues in minutes.</p>
<hr data-start="5776" data-end="5779" />
<h3 data-section-id="4cclmo" data-start="5781" data-end="5826">Step 7: Use the Python Launcher on Windows</h3>
<p data-start="5828" data-end="5927">Windows often installs a tool called the <strong data-start="5869" data-end="5888">Python launcher</strong>, which helps manage multiple versions.</p>
<p data-start="5929" data-end="5933">Try:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>py --version</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="5957" data-end="5987">If it works, you can also use:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>py -m pip install numpy</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="6022" data-end="6058">This approach avoids confusion when:</p>
<ul data-start="6059" data-end="6167">
<li data-section-id="9lce3a" data-start="6059" data-end="6091">Multiple Python versions exist</li>
<li data-section-id="509gbf" data-start="6092" data-end="6130">PATH points to the wrong interpreter</li>
<li data-section-id="1iy56" data-start="6131" data-end="6167">pip commands behave inconsistently</li>
</ul>
<p data-start="6169" data-end="6242">It is especially helpful on systems used for learning or experimentation.</p>
<hr data-start="6244" data-end="6247" />
<h3 data-section-id="14rjr7u" data-start="6249" data-end="6299">Step 8: Check whether pip Is Actually Installed</h3>
<p data-start="6301" data-end="6348">In rare cases, pip may not be installed at all.</p>
<p data-start="6350" data-end="6496">You can check by navigating to your Python folder and opening the <strong data-start="6416" data-end="6427">Scripts</strong> directory. If <code data-start="6442" data-end="6451">pip.exe</code> is missing, pip was not installed correctly.</p>
<p data-start="6498" data-end="6510"><strong>To fix this:</strong></p>
<ul data-start="6511" data-end="6597">
<li data-section-id="qw44lp" data-start="6511" data-end="6539">Rerun the Python installer</li>
<li data-section-id="1jsqqat" data-start="6540" data-end="6559">Choose <strong data-start="6549" data-end="6559">Modify</strong></li>
<li data-section-id="y2flk0" data-start="6560" data-end="6576">Enable <strong data-start="6569" data-end="6576">pip</strong></li>
<li data-section-id="k5bezj" data-start="6577" data-end="6597">Complete the setup</li>
</ul>
<p data-start="6599" data-end="6662">Once installed, repeat the PATH check and restart the terminal.</p>
<hr data-start="6664" data-end="6667" />
<h3 data-section-id="xfnlrl" data-start="6669" data-end="6718">Quick Fix Checklist (For Fast Troubleshooting)</h3>
<p data-start="6720" data-end="6778">If you want the shortest solution path, follow this order:</p>
<ol data-start="6780" data-end="6924">
<li data-section-id="y3o65u" data-start="6780" data-end="6807">Check <code data-start="6789" data-end="6807">python --version</code></li>
<li data-section-id="1r1r19d" data-start="6808" data-end="6840">Try <code data-start="6815" data-end="6840">python -m pip --version</code></li>
<li data-section-id="1si9y8c" data-start="6841" data-end="6874">Add Python and Scripts to PATH</li>
<li data-section-id="16u7sx8" data-start="6875" data-end="6894">Restart terminal</li>
<li data-section-id="pe6li0" data-start="6895" data-end="6924">Reinstall Python if needed</li>
</ol>
<p data-start="6926" data-end="6982">This sequence fixes most systems without advanced steps.</p>
<hr data-start="6984" data-end="6987" />
<h3 data-section-id="1iucdkx" data-start="6989" data-end="7029">Common Mistakes That Cause This Error</h3>
<p data-start="7031" data-end="7102">Many users run into the same problems repeatedly. Avoid these mistakes:</p>
<ul data-start="7104" data-end="7366">
<li data-section-id="kkhx6h" data-start="7104" data-end="7148">Installing Python from unofficial websites</li>
<li data-section-id="1xa6cij" data-start="7149" data-end="7180">Skipping “Add Python to PATH”</li>
<li data-section-id="can4kl" data-start="7181" data-end="7243">Installing packages without activating a virtual environment</li>
<li data-section-id="aielg0" data-start="7244" data-end="7296">Using old terminal windows after changing settings</li>
<li data-section-id="xfwhev" data-start="7297" data-end="7366">Mixing multiple Python versions without knowing which one is active</li>
</ul>
<p data-start="7368" data-end="7434">Being aware of these issues prevents future errors and saves time.</p>
<hr data-start="7436" data-end="7439" />
<h3 data-section-id="mg9ay0" data-start="7441" data-end="7479">How Virtual Environments Affect pip</h3>
<p data-start="7481" data-end="7538">When using virtual environments, pip behaves differently.</p>
<p data-start="7540" data-end="7699">If your virtual environment is <strong data-start="7571" data-end="7588">not activated</strong>, pip installs packages globally.<br data-start="7621" data-end="7624" />If it <strong data-start="7630" data-end="7646">is activated</strong>, pip installs packages inside that environment only.</p>
<p data-start="7701" data-end="7742">This is normal behavior and not an error.</p>
<p data-start="7744" data-end="7788">If pip suddenly “disappears,” check whether:</p>
<ul data-start="7789" data-end="7867">
<li data-section-id="1o6txhf" data-start="7789" data-end="7819">The environment is activated</li>
<li data-section-id="kpfgge" data-start="7820" data-end="7867">The terminal is using the correct interpreter</li>
</ul>
<p data-start="7869" data-end="7937">Understanding this avoids confusion when switching between projects.</p>
<hr data-start="7939" data-end="7942" />
<h4 data-section-id="114wazr" data-start="7944" data-end="7961">Final Thoughts</h4>
<p data-start="7963" data-end="8186">Seeing “pip is not recognized” on Windows can feel intimidating, but it is almost always a configuration issue—not a failure. Once PATH is set correctly or Python is reinstalled properly, pip becomes stable and predictable.</p>
<p data-start="8188" data-end="8224">The most important takeaway is this:</p>
<ul data-start="8225" data-end="8287">
<li data-section-id="1h44rqt" data-start="8225" data-end="8247">pip is rarely broken</li>
<li data-section-id="3xhbic" data-start="8248" data-end="8287">Windows just needs clear instructions</li>
</ul>
<p data-start="8289" data-end="8481">After fixing this issue once, you will rarely face it again. And once pip works properly, installing libraries, building projects, and learning Python becomes much smoother and more enjoyable.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Create a Virtual Environment in Python (Beginner-Friendly Guide)</title>
		<link>https://cybogeek.com/how-to-create-a-virtual-environment-in-python-beginner-friendly-guide/</link>
		
		<dc:creator><![CDATA[Sukanto]]></dc:creator>
		<pubDate>Sun, 03 May 2026 11:14:42 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[development environment]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[Python beginner]]></category>
		<category><![CDATA[Python packages]]></category>
		<category><![CDATA[Python setup]]></category>
		<category><![CDATA[Python tutorial]]></category>
		<category><![CDATA[venv]]></category>
		<category><![CDATA[virtual environment]]></category>
		<category><![CDATA[VS Code]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://cybogeek.com/?p=461</guid>

					<description><![CDATA[If you are learning Python, one of the best habits you can build early is using a virtual environment for every project. At first, the term “virtual environment” may sound technical or intimidating, but the idea behind it is actually very simple. A virtual environment gives each Python project its own isolated space for packages [&#8230;]]]></description>
										<content:encoded><![CDATA[<p data-start="456" data-end="706">If you are learning Python, one of the best habits you can build early is using a <strong data-start="538" data-end="561">virtual environment</strong> for every project. At first, the term “virtual environment” may sound technical or intimidating, but the idea behind it is actually very simple.</p>
<p data-start="708" data-end="952">A virtual environment gives each Python project its <strong data-start="760" data-end="782">own isolated space</strong> for packages and dependencies. This prevents one project from interfering with another and helps you avoid many common problems beginners face when installing libraries.</p>
<p data-start="954" data-end="1213">According to <strong data-start="967" data-end="1008"><span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"><span class="whitespace-normal">Python Software Foundation</span></span></strong> documentation, virtual environments are a standard part of modern Python development. The <strong data-start="1099" data-end="1147"><span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"><span class="whitespace-normal">Python Packaging Authority</span></span> (PyPA)</strong> also recommends using them for clean, predictable project setups.</p>
<p data-start="1215" data-end="1245">In this guide, you will learn:</p>
<ul data-start="1246" data-end="1475">
<li data-section-id="1mx593h" data-start="1246" data-end="1277">What a virtual environment is</li>
<li data-section-id="17klhcd" data-start="1278" data-end="1308">Why beginners should use one</li>
<li data-section-id="5m17lq" data-start="1309" data-end="1370">How to create and activate a virtual environment on Windows</li>
<li data-section-id="7gx1u7" data-start="1371" data-end="1403">How to install packages safely</li>
<li data-section-id="amw4xg" data-start="1404" data-end="1430">Common mistakes to avoid</li>
<li data-section-id="e8da50" data-start="1431" data-end="1475">How virtual environments work with VS Code</li>
</ul>
<p data-start="1477" data-end="1566">No advanced knowledge is required. If Python is already installed, you’re ready to begin.</p>
<p data-start="1477" data-end="1566">
<hr data-start="1568" data-end="1571" />
<h3 data-section-id="y2u358" data-start="1573" data-end="1620"><span role="text"><strong data-start="1576" data-end="1620">What Is a Virtual Environment in Python?</strong></span></h3>
<p data-start="1622" data-end="1692">A <strong data-start="1624" data-end="1647">virtual environment</strong> is a self-contained directory that includes:</p>
<ul data-start="1693" data-end="1778">
<li data-section-id="hyggkd" data-start="1693" data-end="1715">A Python interpreter</li>
<li data-section-id="1q8znfl" data-start="1716" data-end="1736">Its own <code data-start="1726" data-end="1731">pip</code> tool</li>
<li data-section-id="1bd6rb4" data-start="1737" data-end="1778">A private folder for installed packages</li>
</ul>
<p data-start="1780" data-end="1930">This environment is <strong data-start="1800" data-end="1849">separate from your system Python installation</strong>. Any packages you install inside it are only available to that specific project.</p>
<h4 data-section-id="1euzsyn" data-start="1932" data-end="1961"><span role="text"><strong data-start="1936" data-end="1961">Why does this matter?</strong></span></h4>
<p data-start="1963" data-end="2067">Without virtual environments, Python installs packages globally. This can quickly lead to problems when:</p>
<ul data-start="2068" data-end="2227">
<li data-section-id="13cwoeu" data-start="2068" data-end="2129">Two projects require different versions of the same library</li>
<li data-section-id="m2nf3k" data-start="2130" data-end="2175">Updating one package breaks another project</li>
<li data-section-id="1xk6gss" data-start="2176" data-end="2227">You forget which packages belong to which project</li>
</ul>
<p data-start="2229" data-end="2362">A virtual environment solves this by keeping everything isolated. Each project gets exactly what it needs—nothing more, nothing less.</p>
<p data-start="2364" data-end="2467">This isolation is the reason virtual environments are considered <strong data-start="2429" data-end="2446">best practice</strong>, even for beginners.</p>
<hr data-start="2469" data-end="2472" />
<h3 data-section-id="1rlkwdf" data-start="2474" data-end="2526"><span role="text"><strong data-start="2477" data-end="2526">Why Beginners Should Use Virtual Environments</strong></span></h3>
<p data-start="2528" data-end="2613">Many beginners skip virtual environments at first. The problems usually appear later.</p>
<p data-start="2615" data-end="2653">Here’s what often happens without one:</p>
<ul data-start="2654" data-end="2788">
<li data-section-id="1n5wljj" data-start="2654" data-end="2686">You install a package globally</li>
<li data-section-id="1793jjn" data-start="2687" data-end="2722">A different project stops working</li>
<li data-section-id="1sr779o" data-start="2723" data-end="2756">You don’t remember what changed</li>
<li data-section-id="egjxfz" data-start="2757" data-end="2788">Debugging becomes frustrating</li>
</ul>
<p data-start="2790" data-end="2849">Using a virtual environment from the start helps you avoid:</p>
<ul data-start="2850" data-end="2949">
<li data-section-id="1vz2w5e" data-start="2850" data-end="2872">Dependency conflicts</li>
<li data-section-id="1p1cpn5" data-start="2873" data-end="2890">Broken projects</li>
<li data-section-id="ibtu7a" data-start="2891" data-end="2913">Hard-to-trace errors</li>
<li data-section-id="1ro8gh3" data-start="2914" data-end="2949">Messy system Python installations</li>
</ul>
<p data-start="2951" data-end="3071">It also teaches you <strong data-start="2971" data-end="3008">real-world Python workflow habits</strong> early, making it much easier to work on larger projects later.</p>
<p data-start="3073" data-end="3144">Even for simple learning scripts, virtual environments are worth using.</p>
<hr data-start="3146" data-end="3149" />
<h3 data-section-id="1lsrbwf" data-start="3151" data-end="3174"><span role="text"><strong data-start="3154" data-end="3174">Before You Start</strong></span></h3>
<p data-start="3176" data-end="3225">Before creating a virtual environment, make sure:</p>
<ul data-start="3227" data-end="3337">
<li data-section-id="q3w2b" data-start="3227" data-end="3263">Python is installed on your system</li>
<li data-section-id="owpdqu" data-start="3264" data-end="3289">You can open a terminal</li>
<li data-section-id="a0vl1j" data-start="3290" data-end="3337">You know where your project folder is located</li>
</ul>
<p data-start="3339" data-end="3447">Modern Python versions include the built-in <code data-start="3383" data-end="3389">venv</code> module, so <strong data-start="3401" data-end="3446">you do not need to install anything extra</strong>.</p>
<p data-start="3449" data-end="3461">You can use:</p>
<ul data-start="3462" data-end="3581">
<li data-section-id="74e0bv" data-start="3462" data-end="3478">Command Prompt</li>
<li data-section-id="bfkb61" data-start="3479" data-end="3491">PowerShell</li>
<li data-section-id="1naxmc3" data-start="3492" data-end="3510">Windows Terminal</li>
<li data-section-id="1tqjr14" data-start="3511" data-end="3581">The integrated terminal in <strong data-start="3540" data-end="3581"><span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"><span class="whitespace-normal">Visual Studio Code</span></span></strong></li>
</ul>
<hr data-start="3583" data-end="3586" />
<h3 data-section-id="b53mw3" data-start="3588" data-end="3637"><span role="text"><strong data-start="3591" data-end="3637">Step 1: Open or Create Your Project Folder</strong></span></h3>
<p data-start="3639" data-end="3708">First, create or open the folder where your Python project will live.</p>
<p data-start="3710" data-end="3718">Example:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code><span class="ͼl">mkdir</span> myproject
<span class="ͼl">cd</span> myproject</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="3761" data-end="3921">Now open a terminal <strong data-start="3781" data-end="3803">inside this folder</strong>. This is important because the virtual environment should live inside the project, not somewhere else on your system.</p>
<p data-start="3761" data-end="3921"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-463" src="https://cybogeek.com/wp-content/uploads/2026/05/venv-mkdir.png" alt="make new folder-venv project" width="756" height="241" srcset="https://cybogeek.com/wp-content/uploads/2026/05/venv-mkdir.png 756w, https://cybogeek.com/wp-content/uploads/2026/05/venv-mkdir-300x96.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></p>
<h4 data-section-id="1hk778y" data-start="3923" data-end="3959"><span role="text"><strong data-start="3927" data-end="3959">Why name the folder <code data-start="3949" data-end="3956">.venv</code>?</strong></span></h4>
<p data-start="3961" data-end="4025">A commonly recommended name for virtual environments is <code data-start="4017" data-end="4024">.venv</code>.</p>
<p data-start="4027" data-end="4094">Python’s own tutorial mentions <code data-start="4058" data-end="4065">.venv</code> as a popular choice because:</p>
<ul data-start="4095" data-end="4197">
<li data-section-id="rrruw8" data-start="4095" data-end="4120">It stays out of the way</li>
<li data-section-id="1df6yvx" data-start="4121" data-end="4160">It avoids confusion with <code data-start="4148" data-end="4154">.env</code> files</li>
<li data-section-id="tls3wn" data-start="4161" data-end="4197">Many tools automatically detect it</li>
</ul>
<p data-start="4199" data-end="4240">Using <code data-start="4205" data-end="4212">.venv</code> is a clean, modern default.</p>
<hr data-start="4242" data-end="4245" />
<h3 data-section-id="iz1fdi" data-start="4247" data-end="4292"><span role="text"><strong data-start="4250" data-end="4292">Step 2: Create the Virtual Environment</strong></span></h3>
<p data-start="4294" data-end="4347">Run the following command inside your project folder:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>python <span class="ͼn">-m</span> venv .venv</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="4383" data-end="4409">This command tells Python:</p>
<ul data-start="4410" data-end="4510">
<li data-section-id="1b95aa7" data-start="4410" data-end="4442">Use the built-in <code data-start="4429" data-end="4435">venv</code> module</li>
<li data-section-id="1axldx5" data-start="4443" data-end="4473">Create a virtual environment</li>
<li data-section-id="1vs3mrg" data-start="4474" data-end="4510">Store it in a folder named <code data-start="4503" data-end="4510">.venv</code></li>
</ul>
<p data-start="4512" data-end="4625">The <strong data-start="4516" data-end="4546">Python Packaging Authority</strong> uses this exact pattern in its examples, making it a widely accepted standard.</p>
<p data-start="4512" data-end="4625"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-464" src="https://cybogeek.com/wp-content/uploads/2026/05/venv-virtualfolder.png" alt="venv initialisation" width="756" height="180" srcset="https://cybogeek.com/wp-content/uploads/2026/05/venv-virtualfolder.png 756w, https://cybogeek.com/wp-content/uploads/2026/05/venv-virtualfolder-300x71.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></p>
<h4 data-section-id="1o673yo" data-start="4627" data-end="4665"><span role="text"><strong data-start="4631" data-end="4665">Alternative command on Windows</strong></span></h4>
<p data-start="4667" data-end="4724">If your system uses the Python launcher, this also works:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>py <span class="ͼn">-m</span> venv .venv</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="4756" data-end="4930">Python’s documentation explains that the virtual environment is created using the Python version that runs the command. That’s why <code data-start="4887" data-end="4903">python -m venv</code> (or <code data-start="4908" data-end="4920">py -m venv</code>) matters.</p>
<hr data-start="4932" data-end="4935" />
<h3 data-section-id="11oxt4a" data-start="4937" data-end="4984"><span role="text"><strong data-start="4940" data-end="4984">Step 3: Activate the Virtual Environment</strong></span></h3>
<p data-start="4986" data-end="5050">Creating the environment is not enough—you must <strong data-start="5034" data-end="5049">activate it</strong>.</p>
<p data-start="5052" data-end="5083">Activation tells your terminal:</p>
<blockquote data-start="5084" data-end="5146">
<p data-start="5086" data-end="5146">“Use the Python inside this project, not the system Python.”</p>
</blockquote>
<h4 data-section-id="g4sm0" data-start="5148" data-end="5186"><span role="text"><strong data-start="5152" data-end="5186">Activation commands on Windows</strong></span></h4>
<p data-start="5188" data-end="5207"><strong data-start="5188" data-end="5207">Command Prompt:</strong></p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>.venv\Scripts\activate.bat</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="5248" data-end="5263"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-465" src="https://cybogeek.com/wp-content/uploads/2026/05/activate-venv.png" alt="activate venv script" width="755" height="202" srcset="https://cybogeek.com/wp-content/uploads/2026/05/activate-venv.png 755w, https://cybogeek.com/wp-content/uploads/2026/05/activate-venv-300x80.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></p>
<p data-start="5248" data-end="5263"><strong data-start="5248" data-end="5263">PowerShell:</strong></p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>.<span class="ͼm">venv</span>\<span class="ͼm">Scripts</span>\<span class="ͼm">Activate</span>.<span class="ͼm">ps1</span></code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="5310" data-end="5393">On Windows, activation scripts live inside the <code data-start="5357" data-end="5366">Scripts</code> folder of the environment.</p>
<h4 data-section-id="agiqxt" data-start="5395" data-end="5429"><span role="text"><strong data-start="5399" data-end="5429">How do you know it worked?</strong></span></h4>
<p data-start="5431" data-end="5492">Once activated, your terminal prompt usually changes to show:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>(.venv)</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="5514" data-end="5559">This means the virtual environment is active.</p>
<p data-start="5514" data-end="5559"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-466" src="https://cybogeek.com/wp-content/uploads/2026/05/active-venv-python.png" alt="active venv in python project" width="757" height="232" srcset="https://cybogeek.com/wp-content/uploads/2026/05/active-venv-python.png 757w, https://cybogeek.com/wp-content/uploads/2026/05/active-venv-python-300x92.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></p>
<hr data-start="5561" data-end="5564" />
<h3 data-section-id="1do90oo" data-start="5566" data-end="5622"><span role="text"><strong data-start="5569" data-end="5622">Step 4: Verify the Virtual Environment Is Working</strong></span></h3>
<p data-start="5624" data-end="5683">Now confirm that your terminal is using the correct Python.</p>
<p data-start="5685" data-end="5689">Run:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>python <span class="ͼn">--version</span></code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="5720" data-end="5747"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-467" src="https://cybogeek.com/wp-content/uploads/2026/05/verify-python-version-venv.png" alt="verify python version inside venv" width="755" height="221" srcset="https://cybogeek.com/wp-content/uploads/2026/05/verify-python-version-venv.png 755w, https://cybogeek.com/wp-content/uploads/2026/05/verify-python-version-venv-300x88.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></p>
<p data-start="5720" data-end="5747">Then check the Python path:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>where python</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="5774" data-end="5847">While the environment is active, the path should point to something like:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>...\myproject\.venv\Scripts\python.exe</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="5900" data-end="6029">The packaging guide explains that this confirms Python is being loaded from the virtual environment, not the global installation.</p>
<hr data-start="6031" data-end="6034" />
<h3 data-section-id="so0wf8" data-start="6036" data-end="6097"><span role="text"><strong data-start="6039" data-end="6097">Step 5: Install Packages Safely Inside the Environment</strong></span></h3>
<p data-start="6099" data-end="6202">Once the environment is active, any package you install with <code data-start="6160" data-end="6165">pip</code> goes <strong data-start="6171" data-end="6201">only into that environment</strong>.</p>
<p data-start="6204" data-end="6212">Example:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>pip install requests</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="6247" data-end="6308">Now the <code data-start="6255" data-end="6265">requests</code> library is available to this project only.</p>
<p data-start="6310" data-end="6359">This is the main benefit of virtual environments:</p>
<ul data-start="6360" data-end="6438">
<li data-section-id="1snkpx0" data-start="6360" data-end="6381">No global pollution</li>
<li data-section-id="6p8ecy" data-start="6382" data-end="6407">No accidental conflicts</li>
<li data-section-id="b89heu" data-start="6408" data-end="6438">Cleaner project dependencies</li>
</ul>
<p data-start="6440" data-end="6535">If you deactivate the environment and open another project, that package will not appear there.</p>
<hr data-start="6537" data-end="6540" />
<h3 data-section-id="3lpbam" data-start="6542" data-end="6591"><span role="text"><strong data-start="6545" data-end="6591">Step 6: Deactivate the Virtual Environment</strong></span></h3>
<p data-start="6593" data-end="6659">When you are done working, you can exit the environment by typing:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>deactivate</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="6685" data-end="6740">This returns your terminal to the normal system Python.</p>
<p data-start="6685" data-end="6740"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-468" src="https://cybogeek.com/wp-content/uploads/2026/05/deactivate-venv-python.png" alt="deactivate venv " width="756" height="296" srcset="https://cybogeek.com/wp-content/uploads/2026/05/deactivate-venv-python.png 756w, https://cybogeek.com/wp-content/uploads/2026/05/deactivate-venv-python-300x117.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></p>
<p data-start="6742" data-end="6767">The standard workflow is:</p>
<ol data-start="6768" data-end="6859">
<li data-section-id="10l7jyq" data-start="6768" data-end="6793">Create the environment</li>
<li data-section-id="tpm0il" data-start="6794" data-end="6808">Activate it</li>
<li data-section-id="vs6vbo" data-start="6809" data-end="6831">Work on the project</li>
<li data-section-id="3npn0h" data-start="6832" data-end="6859">Deactivate when finished</li>
</ol>
<p data-start="6861" data-end="6907">This cycle becomes second nature very quickly.</p>
<hr data-start="6909" data-end="6912" />
<h3 data-section-id="1u8etyj" data-start="6914" data-end="6958"><span role="text"><strong data-start="6917" data-end="6958">Using Virtual Environments in VS Code</strong></span></h3>
<p data-start="6960" data-end="7054">If you use <strong data-start="6971" data-end="7012"><span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"><span class="whitespace-normal">Visual Studio Code</span></span></strong>, virtual environments integrate smoothly.</p>
<p data-start="7056" data-end="7062">Steps:</p>
<ol data-start="7063" data-end="7210">
<li data-section-id="1af6tmj" data-start="7063" data-end="7100">Open the project folder in VS Code</li>
<li data-section-id="1kt00ha" data-start="7101" data-end="7128">Open the command palette</li>
<li data-section-id="hhrnw6" data-start="7129" data-end="7169">Select <strong data-start="7139" data-end="7169">Python: Select Interpreter</strong></li>
<li data-section-id="uvs1xe" data-start="7170" data-end="7210">Choose the interpreter inside <code data-start="7203" data-end="7210">.venv</code></li>
</ol>
<p data-start="7212" data-end="7349">According to guides from <strong data-start="7237" data-end="7278"><span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"><span class="whitespace-normal">Real Python</span></span></strong>, VS Code can automatically detect environments and display paths like:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>.venv\Scripts\python</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="7385" data-end="7399">Once selected:</p>
<ul data-start="7400" data-end="7494">
<li data-section-id="1lnk0am" data-start="7400" data-end="7435">VS Code uses the correct packages</li>
<li data-section-id="bl0kyi" data-start="7436" data-end="7460">Linting works properly</li>
<li data-section-id="d5avgj" data-start="7461" data-end="7494">Debugging becomes more reliable</li>
</ul>
<hr data-start="7496" data-end="7499" />
<h3 data-section-id="1yv347s" data-start="7501" data-end="7538"><span role="text"><strong data-start="7504" data-end="7538">Common Mistakes Beginners Make</strong></span></h3>
<p data-start="7540" data-end="7604">Most virtual environment issues come from a few simple mistakes:</p>
<ul data-start="7606" data-end="7889">
<li data-section-id="1yhqnre" data-start="7606" data-end="7659">Creating the environment outside the project folder</li>
<li data-section-id="18o2qjy" data-start="7660" data-end="7727">Forgetting to activate the environment before installing packages</li>
<li data-section-id="13v7o6f" data-start="7728" data-end="7764">Using the wrong activation command</li>
<li data-section-id="gm1e7q" data-start="7765" data-end="7807">Installing packages globally by accident</li>
<li data-section-id="vps25v" data-start="7808" data-end="7861">Deleting <code data-start="7819" data-end="7826">.venv</code> without understanding what it does</li>
<li data-section-id="1miusbt" data-start="7862" data-end="7889">Committing <code data-start="7875" data-end="7882">.venv</code> to Git</li>
</ul>
<p data-start="7891" data-end="8002">The Python Packaging Authority specifically recommends <strong data-start="7946" data-end="8001">excluding virtual environments from version control</strong>.</p>
<p data-start="8004" data-end="8029">Add this to <code data-start="8016" data-end="8028">.gitignore</code>:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>.venv/</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr data-start="8050" data-end="8053" />
<h3 data-section-id="15jq8w0" data-start="8055" data-end="8095"><span role="text"><strong data-start="8058" data-end="8095">Should You Use <code data-start="8075" data-end="8082">.venv</code> or <code data-start="8086" data-end="8092">venv</code>?</strong></span></h3>
<p data-start="8097" data-end="8153">Both names work, but <code data-start="8118" data-end="8125">.venv</code> is often the better choice.</p>
<p data-start="8155" data-end="8186">Reasons <code data-start="8163" data-end="8170">.venv</code> is recommended:</p>
<ul data-start="8187" data-end="8309">
<li data-section-id="1arlx8m" data-start="8187" data-end="8219">Mentioned in Python’s tutorial</li>
<li data-section-id="rk8azk" data-start="8220" data-end="8251">Hidden in many file explorers</li>
<li data-section-id="8uo22d" data-start="8252" data-end="8282">Avoids confusion with <code data-start="8276" data-end="8282">.env</code></li>
<li data-section-id="1djj9r7" data-start="8283" data-end="8309">Recognized by many tools</li>
</ul>
<p data-start="8311" data-end="8378">If you are just starting out, <code data-start="8341" data-end="8348">.venv</code> is a safe and modern default.</p>
<hr data-start="8380" data-end="8383" />
<h3 data-section-id="fl3yt6" data-start="8385" data-end="8422"><span role="text"><strong data-start="8388" data-end="8422">Quick Example: Start to Finish</strong></span></h3>
<p data-start="8424" data-end="8455">Here’s the full basic workflow:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code><span class="ͼl">mkdir</span> myproject
<span class="ͼl">cd</span> myproject
python <span class="ͼn">-m</span> venv .venv
.venv\Scripts\activate.bat
pip install requests
python <span class="ͼn">--version</span>
deactivate</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="8596" data-end="8610">This sequence:</p>
<ul data-start="8611" data-end="8740">
<li data-section-id="19pitl7" data-start="8611" data-end="8630">Creates a project</li>
<li data-section-id="aj91ai" data-start="8631" data-end="8662">Creates a virtual environment</li>
<li data-section-id="h6e3pb" data-start="8663" data-end="8677">Activates it</li>
<li data-section-id="15no3nl" data-start="8678" data-end="8698">Installs a package</li>
<li data-section-id="16b1l9p" data-start="8699" data-end="8716">Verifies Python</li>
<li data-section-id="1z0xqzb" data-start="8717" data-end="8740">Exits the environment</li>
</ul>
<p data-start="8742" data-end="8813">This matches the workflow described in official Python and PyPA guides.</p>
<hr data-start="8815" data-end="8818" />
<h4 data-section-id="15mienb" data-start="8820" data-end="8841"><span role="text"><strong data-start="8823" data-end="8841">Final Thoughts</strong></span></h4>
<p data-start="8843" data-end="8958">Creating a virtual environment in Python is one of the <strong data-start="8898" data-end="8935">simplest and most valuable habits</strong> you can develop early.</p>
<p data-start="8960" data-end="9102">It keeps projects isolated, avoids dependency conflicts, and makes your development workflow cleaner and more professional—even as a beginner.</p>
<p data-start="9104" data-end="9242">This is not an advanced trick. It is a <strong data-start="9143" data-end="9169">basic foundation skill</strong> that will save you time, confusion, and frustration as you learn Python.</p>
<p data-start="9244" data-end="9265">Once you get used to:</p>
<div class="relative w-full mt-4 mb-1">
<div class="">
<div class="relative">
<div class="h-full min-h-0 min-w-0">
<div class="h-full min-h-0 min-w-0">
<div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl">
<div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback">
<div class="relative">
<div class="pe-11 pt-3">
<div class="relative z-0 flex max-w-full">
<div id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr" dir="ltr">
<div class="cm-scroller">
<pre class="cm-content q9tKkq_readonly m-0"><code>python -m venv .venv</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p data-start="9299" data-end="9361">project setup becomes faster, cleaner, and far less stressful.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: cybogeek.com @ 2026-05-07 05:00:48 by W3 Total Cache
-->