{"id":3185,"date":"2022-08-04T12:28:32","date_gmt":"2022-08-04T12:28:32","guid":{"rendered":"https:\/\/arzhost.com\/blogs\/?p=3185"},"modified":"2025-09-15T14:45:33","modified_gmt":"2025-09-15T09:45:33","slug":"activate-virtual-env-windows","status":"publish","type":"post","link":"https:\/\/arzhost.com\/blogs\/activate-virtual-env-windows\/","title":{"rendered":"Activate Virtual Env Windows for a New Python Version"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/arzhost.com\/blogs\/activate-virtual-env-windows\/#Introduction_Overview_of_Activating_Virtual_Environments\" >Introduction: Overview of Activating Virtual Environments<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/arzhost.com\/blogs\/activate-virtual-env-windows\/#Virtual_Environments_and_Package_Installation_Importance_and_Benefits\" >Virtual Environments and Package Installation: Importance and Benefits<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/arzhost.com\/blogs\/activate-virtual-env-windows\/#Creating_a_New_Virtual_Environment_for_a_New_Python_Version\" >Creating a New Virtual Environment for a New Python Version<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/arzhost.com\/blogs\/activate-virtual-env-windows\/#Supercharge_Your_WordPress_Hosting%E2%80%94Sign_Up_now_for_Exciting_Features\" >Supercharge Your WordPress Hosting\u2014Sign Up now for Exciting Features<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/arzhost.com\/blogs\/activate-virtual-env-windows\/#CS_Systems_Sharing_a_Virtual_Environment_Collaborative_Setup\" >CS Systems Sharing a Virtual Environment: Collaborative Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/arzhost.com\/blogs\/activate-virtual-env-windows\/#Which_Python_Versions_are_Installable_Compatible_Versions_and_Requirements\" >Which Python Versions are Installable: Compatible Versions and Requirements<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/arzhost.com\/blogs\/activate-virtual-env-windows\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction_Overview_of_Activating_Virtual_Environments\"><\/span><strong>Introduction:<\/strong> Overview of Activating Virtual Environments<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Today here at our <a href=\"https:\/\/arzhost.com\/blogs\/\" data-type=\"link\" data-id=\"https:\/\/arzhost.com\/blogs\/\"><strong>Blog<\/strong><\/a>, we discuss how we <span style=\"color: #000000;\"><strong>Activate Virtual Env Windows<\/strong><\/span> on my computers. A directory with a specific structure is all that a virtual environment is. It has folders that house the packages installed in the virtualenv as well as a bin subdirectory that contains links to a Python interpreter.<\/p>\n\n\n\n<p>The Python interpreter &#8220;knows&#8221; to use the corresponding packages in the virtualenv by being appealed using the path to the bin subdirectory of the virtualenv (as opposed to any packages installed alongside the actual location of the Python interpreter).<\/p>\n\n\n\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/6FMH8lwzSxA\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><br>\nActivate Virtual Env Windows &#8220;virtual&#8221; in this sense; they are not virtual, as in the case of a virtual computer, for example. You can utilize a virtual environment right away after setting it up (details below) by calling Python with the complete path to the bin subdirectory (for example, my venv\/bin\/python3 my program.py).<\/p>\n\n\n\n<p>When you&#8217;ve set up a virtualenv, it includes an activate script that you can use to quickly move the virtualenv bin subdirectory to the top of your PATH (it also updates your shell prompt to let you know this change is in effect). You no longer need to use the complete path to the Python translator (e.g., my venv\/bin\/python3 my program.py) once your virtualenv has been start.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Virtual_Environments_and_Package_Installation_Importance_and_Benefits\"><\/span><strong>Virtual Environments and Package Installation: Importance and Benefits<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this section, we go over how to <a href=\"https:\/\/arzhost.com\/blogs\/python-3-install-virtualenv\/\"><strong>install a package on CS<\/strong><\/a> systems using <a href=\"https:\/\/en.wikipedia.org\/wiki\/Python_(programming_language)\" target=\"_blank\" rel=\"noopener\"><strong>Python 3.7<\/strong><\/a> and establish a virtual environment. The available Python versions are shown here, along with any variations to the process.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"536\" title=\"virtual environment and package installation\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environment-and-package-installation-1024x536.jpg\" alt=\"virtual environment and package installation\" class=\"wp-image-13070\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environment-and-package-installation-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environment-and-package-installation-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environment-and-package-installation-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environment-and-package-installation.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">virtual environment and package installation<\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<p><u>Construct a virtual setting:<\/u><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Python .7 -m venv py37 my venv<\/code><\/li>\n<\/ul>\n\n\n\n<p>This virtual environment can now be &#8220;Activate Virtual Env Windows&#8221; and packages can be manag. The example that follows shoulders you are employing the Bash shell. In the following example, we turn on the virtual environment, use pip to install a package, and perform an inline Python script:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>$ source my_venv_py37\/bin\/activate<\/code><\/li>\n\n\n\n<li><code>(my_venv_py37) $ python --version<\/code><\/li>\n\n\n\n<li><code>Python 3.7.3<\/code><\/li>\n\n\n\n<li><code>(my_venv_py37) $ python -m pip install six<\/code><\/li>\n\n\n\n<li><code>Collecting six<\/code>\n<ul class=\"wp-block-list\">\n<li><strong>downloading&#8230;&#8230;.<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>Installing collected packages: six<\/code><\/li>\n\n\n\n<li><code>Successfully installed six-1.16.0<\/code><\/li>\n\n\n\n<li><code>(my_venv_py37) $ python -m pip freeze<\/code><\/li>\n\n\n\n<li><code>six==1.16.0<\/code><\/li>\n\n\n\n<li><code>(my_venv_py37) $ python -c \"import six; print (six. __version__)\"<\/code><\/li>\n\n\n\n<li><code>16.0<\/code><\/li>\n\n\n\n<li><code>(my_venv_py37) $ deactivate<\/code><\/li>\n\n\n\n<li><code>$<\/code><\/li>\n<\/ul>\n\n\n\n<p>The preceding might have been complete without the use of activating if the path to the Python interpreter had been fully specify in the virtual environment directory each time:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>$ python3.7 -m venv my_venv_py37<\/code><\/li>\n\n\n\n<li><code>$ my_venv_py37\/bin\/python --version<\/code><\/li>\n\n\n\n<li><code>Python 3.7.3<\/code><\/li>\n\n\n\n<li><code>$ my_venv_py37\/bin\/python -m pip install six<\/code><\/li>\n\n\n\n<li><code>Collecting six<\/code>\n<ul class=\"wp-block-list\">\n<li><strong>downloading&#8230;&#8230;.<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>Installing collected packages: six<\/code><\/li>\n\n\n\n<li><code>Successfully installed six-1.12.0<\/code><\/li>\n\n\n\n<li><code>$ my_venv_py37\/bin\/python -m pip freeze<\/code><\/li>\n\n\n\n<li><code>six==1.12.0<\/code><\/li>\n\n\n\n<li><code>$ my_venv_py37\/bin\/python -c \"import six; print (six. __version__)\"<\/code><\/li>\n\n\n\n<li><code>12.0<\/code><\/li>\n<\/ul>\n\n\n\n<p>Please take note that we advise you to specify the main and minor version numbers when building and Activate Virtual Env Windows. As we have done in the examples above. This will create aliases for Python, python, and PythonN in your virtual environment. As a result, you will have the freedom to use pythonN.M in scripts or documentation if you so desire.<\/p>\n\n\n\n<p><strong>Related article: <a href=\"https:\/\/arzhost.com\/blogs\/python-3-install-pip3\/\">Python 3 Install PIP3<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Creating_a_New_Virtual_Environment_for_a_New_Python_Version\"><\/span><strong>Creating a New Virtual Environment for a New Python Version<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>It should be notified that a virtual environment is bound to a specific (major, minor) Python version. This is accomplish by creating a symbolic link in the virtual environment directory&#8217;s bin subdirectory.<\/p>\n\n\n\n<p>The virtual environment needs to be recreated if the symbolic link&#8217;s target disappears or switches to a different Python version.<\/p>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-4a1de1b0 wp-block-button uag-blocks-common-selector\" style=\"--z-index-desktop:479;;--z-index-tablet:undefined;;--z-index-mobile:undefined;\"><div class=\"uagb-cta__wrap\"><h2 class=\"uagb-cta__title\"><span class=\"ez-toc-section\" id=\"Supercharge_Your_WordPress_Hosting%E2%80%94Sign_Up_now_for_Exciting_Features\"><\/span><a href=\"https:\/\/arzhost.com\/wordpress-hosting\/\" data-type=\"link\" data-id=\"https:\/\/arzhost.com\/wordpress-hosting\/\">Supercharge Your WordPress Hosting\u2014Sign Up now for Exciting Features<\/a><span class=\"ez-toc-section-end\"><\/span><\/h2><p class=\"uagb-cta__desc\">Enhance Your WordPress Site with <strong><a href=\"https:\/\/arzhost.com\/\" data-type=\"link\" data-id=\"https:\/\/arzhost.com\/\">ARZ Host<\/a><\/strong>\u2014Get your Hosting Plan Today at just $0.99\/month!<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/arzhost.com\/wordpress-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_self\" rel=\"noopener noreferrer\">Read More<\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CS_Systems_Sharing_a_Virtual_Environment_Collaborative_Setup\"><\/span><strong>CS Systems Sharing a Virtual Environment: Collaborative Setup<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/\"><strong>Activate Virtual Env Windows<\/strong><\/a> must meet two requirements to work on a server other than the one it was created on: (1) the directory must be present in the same relative location in the file system, and (2) the symbolic link in the bin subdirectory must (still) point to the same version of the Python interpreter.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"536\" title=\"collaborative setup\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/collaborative-setup-1024x536.jpg\" alt=\"collaborative setup\" class=\"wp-image-13072\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/collaborative-setup-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/collaborative-setup-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/collaborative-setup-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/collaborative-setup.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">collaborative setup<\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<p>For instance, if you log in to cycles, you will land on either the soak, wash, rinse, or spin servers. Because the cycling machines mount project space uniformly and are kept up to date with the install software. When you later log in to rinse. You can use a virtual environment that was built when you were log in to soak just fine.<\/p>\n\n\n\n<p>You can create a local duplicate of Python in your project space for the greatest flexibility and portability. Any CS System that mounts project space will thus have access to any virtual environment generated with such a local copy. (Including the web servers for the project space.)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Which_Python_Versions_are_Installable_Compatible_Versions_and_Requirements\"><\/span><strong>Which Python Versions are Installable: Compatible Versions and Requirements<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Python has two main restatements: Python 2 and Python 3. 2008 saw the release of Python 3&#8217;s initial version. Python 2 reached its end-of-life (EOL) on January 1, 2020.<\/p>\n\n\n\n<p>Use Python 3 while developing new software. Use version 3.7 or, even better, the most recent production version that is accessible on the CS systems you&#8217;ll be using. (You might do this by creating a local copy of your favorite Python version.)<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"536\" title=\"which python versions are installable\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/which-python-versions-are-installable-1024x536.jpg\" alt=\"which python versions are installable\" class=\"wp-image-13073\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/which-python-versions-are-installable-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/which-python-versions-are-installable-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/which-python-versions-are-installable-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/which-python-versions-are-installable.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">which python versions are installable<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We advise taking the time right away to port any Python 2 code you may still have to Python 3. See also: Converting Python 2 Code to Python 3. The available Python versions on our systems are describe in the sections that follow. Along with instructions on how to set up virtual environments linke to a certain Python interpreter.<\/p>\n\n\n\n<p>In this tutorial, we learn how to Activate Virtual Env Windows on my computers. So just one click <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/\"><u>here<\/u><\/a><\/span><\/strong> and more learns about the virtual environment. For reliable hosting services, Visit <a href=\"https:\/\/arzhost.com\/\"><strong>ARZ Host<\/strong><\/a>.<\/p>\n\n\n\n<p><strong>Read More:<\/strong><\/p>\n\n\n<ul class=\"wp-block-latest-posts__list wp-block-latest-posts\"><li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/how-to-fix-403-forbidden-error-wordpress\/\">How To Fix 403 Forbidden Error WordPress<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/how-to-get-the-most-out-of-claude-ai\/\">How To Get The Most Out Of Claude Ai<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/bad-gateway-error-502-the-ultimate-guide-to-quick-fixes\/\">Bad Gateway Error (502): The Ultimate Guide to Quick Fixes<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/a-deep-dive-into-todays-best-linux-distros\/\">A Deep Dive Into Today\u2019s Best Linux Distros<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/domain-investor-terms-powerful-strategy\/\">Domain Investor Terms: Expert Insight on Powerful Strategy<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Introduction: Overview of Activating Virtual Environments Today here at our Blog, we discuss how we Activate Virtual Env Windows on my computers. A directory with a specific structure is all that a virtual environment is. It has folders that house the packages installed in the virtualenv as well as a bin subdirectory that contains links [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6542,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,29,16,19],"tags":[],"table_tags":[],"class_list":["post-3185","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge","category-python","category-tutorial","category-window"],"_links":{"self":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/comments?post=3185"}],"version-history":[{"count":7,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3185\/revisions"}],"predecessor-version":[{"id":13074,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3185\/revisions\/13074"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media\/6542"}],"wp:attachment":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media?parent=3185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/categories?post=3185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/tags?post=3185"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/table_tags?post=3185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}