{"id":3114,"date":"2022-07-29T12:10:37","date_gmt":"2022-07-29T12:10:37","guid":{"rendered":"https:\/\/arzhost.com\/blogs\/?p=3114"},"modified":"2025-09-25T15:10:24","modified_gmt":"2025-09-25T10:10:24","slug":"python-3-activate-venv","status":"publish","type":"post","link":"https:\/\/arzhost.com\/blogs\/python-3-activate-venv\/","title":{"rendered":"Python 3 Activate Venv"},"content":{"rendered":"<p>When using Python for data science or development for the first time. Beginners frequently run into the issue of why their project stops working after focusing on something else for a while. Additionally, you might not understand how to manage <span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/arzhost.com\/blogs\/python-3-activate-venv\/\">Python 3 Activate Venv<\/a><\/strong><\/span> versions between projects or where your Python packages are kept.<\/p>\n<p>Well, breathe a sigh of relief because virtual environments have saved the day. In reality, they have existed for a very long time. so long that I was unable to locate a reference.<\/p>\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/APOPm01BVrk\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\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\/python-3-activate-venv\/#What_do_virtual_environments_in_Python_mean\" >What do virtual environments in Python mean?<\/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\/python-3-activate-venv\/#Create_the_Python_3_Activate_Venv\" >Create the Python 3 Activate Venv<\/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\/python-3-activate-venv\/#Taking_Care_of_Packages_in_Virtual_Environments_Settings\" >Taking Care of Packages in Virtual Environments Settings<\/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\/python-3-activate-venv\/#Virtual_Environment_is_Remove\" >Virtual Environment is Remove<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_do_virtual_environments_in_Python_mean\"><\/span><strong>What do virtual environments in Python mean?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>I was having numerous, concurrent instances of the Python interpreter. Python 3 Activate Venv each with a different package set and configuration, is possible in a virtual environment. A unique copy of the Python interpreter and its supporting utilities are present in each virtual environment.<\/p>\n<p><a href=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/what-do-virtual-environments-in-python-mean-2.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone  wp-image-13868\" title=\"what do virtual environments in python mean\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/what-do-virtual-environments-in-python-mean-2-300x157.jpg\" alt=\"what do virtual environments in python mean\" width=\"730\" height=\"382\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/what-do-virtual-environments-in-python-mean-2-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/what-do-virtual-environments-in-python-mean-2-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/what-do-virtual-environments-in-python-mean-2-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/what-do-virtual-environments-in-python-mean-2.jpg 1200w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/a><\/p>\n<p>Each virtual environment&#8217;s install packages can only be seen in that environment; they cannot be seen elsewhere. In virtual environments, even big, complicate packages containing platform-specific binaries can be segregat from one another.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Create_the_Python_3_Activate_Venv\"><\/span><strong>Create the Python 3 Activate Venv<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><u>Type: to establish a virtual environment in the specified directory.<\/u><\/p>\n<ul>\n<li><code>venv \/path\/to\/directory python -m<\/code><\/li>\n<\/ul>\n<p>Note that if your system identifies a version of Python 2 as the default Python interpreter. You should use python3 instead of python. To safely retrieve an installed Python version on Windows, use py instead of python. (For more information on utilizing the py launcher in Windows, see this article.)<\/p>\n<p><a href=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/create-the-python-active-venv.jpg\"><img decoding=\"async\" class=\"alignnone  wp-image-13870\" title=\"create the python active venv\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/create-the-python-active-venv-300x157.jpg\" alt=\"create the python active venv\" width=\"730\" height=\"382\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/create-the-python-active-venv-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/create-the-python-active-venv-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/create-the-python-active-venv-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/create-the-python-active-venv.jpg 1200w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/a><\/p>\n<p>It can take a minute or two to complete the entire process of setting up the Python 3 Activate Venv. You should have a directory with a few subdirectories once it&#8217;s finish. Bin on Unix or Scripts on Windows, which houses a copy of the Python interpreter for the virtual environment. Is the most significant subfolder.<\/p>\n<p>It should be note that it can grow to be quite huge because each virtual environment contains a copy of the Python interpreter. Depending on the operating system, a Python 3.9 virtual environment will use anywhere from 15 MB to 25 MB of disc space.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Taking_Care_of_Packages_in_Virtual_Environments_Settings\"><\/span><strong>Taking Care of Packages in Virtual Environments Settings<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Only the pip and setup tools packages will be install when you establish a new Python 3 Activate Venv. Any additional packages you intend to use in the environment must be install. Keep a requirements.txt file containing a list of the project&#8217;s requirements in the project&#8217;s root directory if the project has complicated requirements.<\/p>\n<p>In this manner, you can use the command pip install -r requirements.txt to reinstall each of the required packages if you ever need to recreate the Python 3 Activate Venv.<\/p>\n<p><a href=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/taking-care-of-packages-in-virutal-environements-settings.jpg\"><img decoding=\"async\" class=\"alignnone  wp-image-13871\" title=\"taking care of packages in virutal environements settings\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/taking-care-of-packages-in-virutal-environements-settings-300x157.jpg\" alt=\"taking care of packages in virutal environements settings\" width=\"732\" height=\"383\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/taking-care-of-packages-in-virutal-environements-settings-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/taking-care-of-packages-in-virutal-environements-settings-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/taking-care-of-packages-in-virutal-environements-settings-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/taking-care-of-packages-in-virutal-environements-settings.jpg 1200w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/a><\/p>\n<p>It should be note that a virtual environment&#8217;s local setup tools and pip copies reside there. There are copies of each virtual environment. And each one needs to be update and maintaine separately. Pip needs to be update in each virtual environment independently. This is why you could get warnings about pip being out of date in some virtual environments but not others.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Virtual_Environment_is_Remove\"><\/span><strong>Virtual Environment is Remove<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can simply end the session you were in after you are finish with the Python 3 Activate Venv. Type deactivate at the prompt to continue working in the same session with the default Python interpreter. While Unix users and Windows users using PowerShell can simply type deactivate in any directory. Windows users using the Command Prompt must run deactivate.bat from the Scripts subfolder.<\/p>\n<p><a href=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environments-is-remove.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-13872\" title=\"virtual environments is remove\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environments-is-remove-300x157.jpg\" alt=\"virtual environments is remove\" width=\"726\" height=\"380\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environments-is-remove-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environments-is-remove-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environments-is-remove-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/virtual-environments-is-remove.jpg 1200w\" sizes=\"(max-width: 726px) 100vw, 726px\" \/><\/a><\/p>\n<p>Python 3 Activate Venv settings are containe within themselves. You can simply delete the virtual environment&#8217;s directory once you are done with it. Just be sure to stop any active instances of Python that are utilizing Python 3 Activate Venv first.<\/p>\n<p>Visit <a href=\"http:\/\/www.arzhost.com\"><span style=\"color: #0000ff;\"><strong>www.arzhost.com<\/strong><\/span><\/a> for more errors or more servers related issues.<\/p>\n<p><strong>Related Article<\/strong><\/p>\n<ul>\n<li><span style=\"color: #339966;\"><strong><a style=\"color: #339966;\" href=\"https:\/\/arzhost.com\/blogs\/python-3-install-pip3\/\">python 3 install pip3<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #339966;\"><strong><a style=\"color: #339966;\" href=\"https:\/\/arzhost.com\/blogs\/python-activate-virtual-environment\/\">python activate virtual env<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #339966;\"><strong><a style=\"color: #339966;\" href=\"https:\/\/arzhost.com\/blogs\/python3-create-virtual-environment\/\">python3 creates virtual env<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #339966;\"><strong><a style=\"color: #339966;\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/\">Create Virtual Environment Python 3<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #339966;\"><strong><a style=\"color: #339966;\" href=\"https:\/\/arzhost.com\/blogs\/make-virtual-env-python3\/\">Make Virtual Env Python3<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #339966;\"><strong><a style=\"color: #339966;\" href=\"https:\/\/arzhost.com\/blogs\/python-3-install-virtualenv\/\">Python 3 Install Virtualenv<\/a><\/strong><\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>When using Python for data science or development for the first time. Beginners frequently run into the issue of why their project stops working after focusing on something else for a while. Additionally, you might not understand how to manage Python 3 Activate Venv versions between projects or where your Python packages are kept. Well, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3115,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,16,19],"tags":[],"table_tags":[],"class_list":["post-3114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-tutorial","category-window"],"_links":{"self":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3114","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=3114"}],"version-history":[{"count":4,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3114\/revisions"}],"predecessor-version":[{"id":13873,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3114\/revisions\/13873"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media\/3115"}],"wp:attachment":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media?parent=3114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/categories?post=3114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/tags?post=3114"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/table_tags?post=3114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}