{"id":3106,"date":"2022-07-28T12:50:08","date_gmt":"2022-07-28T12:50:08","guid":{"rendered":"https:\/\/arzhost.com\/blogs\/?p=3106"},"modified":"2025-09-25T15:06:37","modified_gmt":"2025-09-25T10:06:37","slug":"python-virtualenv-python-version","status":"publish","type":"post","link":"https:\/\/arzhost.com\/blogs\/python-virtualenv-python-version\/","title":{"rendered":"Python Virtualenv Python Version"},"content":{"rendered":"<p>There is nothing more annoying in a data science project than a library. That is incompatible with the <span style=\"color: #3366ff;\"><strong><a style=\"color: #3366ff;\" href=\"https:\/\/arzhost.com\/blogs\/python-virtualenv-python-version\/\">Python Virtualenv Python Version<\/a><\/strong><\/span> you are using. Occasionally, all you need to do is set up a virtual environment with a different Python version.<\/p>\n<p>First of all, I&#8217;m sorry to break it to you if you use Venv. Using venv to build a virtual environment for a different Python Virtualenv Python Version is not an easy task. You will need to install virtualenv because of this.<\/p>\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/HTx18uyyHw8\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Today at\u00a0 Arzhost, here we discuss all versions of python in Windows and Linux. Why we need virtualenv, venv, and python activation.<\/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-virtualenv-python-version\/#What_Distinguishes_Venv_and_Virtualenv_from_One_Another\" >What Distinguishes Venv and Virtualenv from One Another?<\/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-virtualenv-python-version\/#Simulated_Settings_with_Different_Python_Versions\" >Simulated Settings with Different Python Versions<\/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-virtualenv-python-version\/#Configuring_Python_Virtual_Environments\" >Configuring Python Virtual Environments<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/arzhost.com\/blogs\/python-virtualenv-python-version\/#1_Python_Virtualenv_Python_Version_in_Window\" >1: Python Virtualenv Python Version in Window<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/arzhost.com\/blogs\/python-virtualenv-python-version\/#2_Python_Virtualenv_Python_Version_in_Linux\" >2: Python Virtualenv Python Version in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/arzhost.com\/blogs\/python-virtualenv-python-version\/#Good_luck\" >Good luck!<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_Distinguishes_Venv_and_Virtualenv_from_One_Another\"><\/span><strong>What Distinguishes Venv and Virtualenv from One Another?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A library called venv is included with Python 3. In other words, setting up virtual environments doesn&#8217;t require the installation of a separate package. On the other side, you can obtain the virtualenv library using pip install virtualenv.<\/p>\n<p><a href=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/distinguish-between-venv-and-virtualenv.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone  wp-image-13863\" title=\"distinguish between venv and virtualenv\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/distinguish-between-venv-and-virtualenv-300x157.jpg\" alt=\"distinguish between venv and virtualenv\" width=\"730\" height=\"382\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/distinguish-between-venv-and-virtualenv-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/distinguish-between-venv-and-virtualenv-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/distinguish-between-venv-and-virtualenv-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/distinguish-between-venv-and-virtualenv.jpg 1200w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/a><\/p>\n<p>Additionally, according to the Arzhost team, venv is describing in the virtualenv documentation as Python Virtualenv Python Version.<\/p>\n<p>Is slower (since it lacks the app-data seed method), less extensible. And unable to build virtual environments for arbitrary install versions of Python (and automatically find these). Unable to be upgraded through pip, and lacking in a comprehensive programmatic API (describe virtual environments without creating them).<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Simulated_Settings_with_Different_Python_Versions\"><\/span><strong>Simulated Settings with Different Python Versions<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The steps below must be followed to build a virtual environment using a different Python Virtualenv Python Version.<\/p>\n<p><u>1: Download the necessary version of Python. Such as Python 3.6.<\/u><\/p>\n<p><u>2: Download and run the Python program. A unique installation is what I advise. It doesn&#8217;t need to be add to PATH.<\/u><\/p>\n<p><u>3: The Virtual Studio Code program (or any other editor or terminal). Windows Run it as an Administrator if the installation directory is located in Program Files.<\/u><\/p>\n<p><u>4: Utilize pip to install virtualenv on your primary Python version. put virtualenv in<\/u><\/p>\n<p><a href=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/simulated-settings-with-different-python-versions-1.jpg\"><img decoding=\"async\" class=\"alignnone  wp-image-13864\" title=\"simulated settings with different python versions\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/simulated-settings-with-different-python-versions-1-300x157.jpg\" alt=\"simulated settings with different python versions\" width=\"732\" height=\"383\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/simulated-settings-with-different-python-versions-1-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/simulated-settings-with-different-python-versions-1-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/simulated-settings-with-different-python-versions-1-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/simulated-settings-with-different-python-versions-1.jpg 1200w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/a><\/p>\n<p><u>5: Use virtualenv to create the virtual environment and the -p argument.<\/u><\/p>\n<ul>\n<li><code>Python<\/code><\/li>\n<li><code>1 py -m virtualenv -p=&lt;your_python_executable&gt; &lt;virtual_environment_directory&gt;<\/code><\/li>\n<\/ul>\n<p><u>If your directory contains spaces. Wrap it in double quotes. Like this:<\/u><\/p>\n<ul>\n<li><code>Python<\/code><\/li>\n<li><code>1 py -m virtualenv -p=\"C:\\Program Files\\Python36\\python.Exe\u201d. virtenv<\/code><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Configuring_Python_Virtual_Environments\"><\/span><strong>Configuring Python Virtual Environments <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The Python Virtual Environments system is a mechanism. To make sure that packages link to various projects are store in various locations. So that they do not conflict. A Python Virtual Environment is a separate environment from your other Python projects or environments that enables it to have independent dependencies.<\/p>\n<p><a href=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/configuring-python-virtual-environments-1.jpg\"><img decoding=\"async\" class=\"alignnone  wp-image-13866\" title=\"configuring python virtual environments\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/configuring-python-virtual-environments-1-300x157.jpg\" alt=\"configuring python virtual environments\" width=\"732\" height=\"383\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/configuring-python-virtual-environments-1-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/configuring-python-virtual-environments-1-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/configuring-python-virtual-environments-1-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/configuring-python-virtual-environments-1.jpg 1200w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"1_Python_Virtualenv_Python_Version_in_Window\"><\/span><strong>1: Python Virtualenv Python Version in Window <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Get start<\/p>\n<p><u>1: Install Python<\/u><\/p>\n<ul>\n<li><code>If you are on an ENGINEERING Windows Desktop, install Python 2.7 through the software center<\/code><\/li>\n<\/ul>\n<p><u>2: Add Python to PATH<\/u><\/p>\n<ul>\n<li><code>Navigate: Control Panel -&gt; User Accounts -&gt; Change my Environment Variables<\/code><\/li>\n<li><code>Inside the top window labeled 'User Variables' select 'Path' and edit it<\/code><\/li>\n<li><code>Select 'Browse' and navigate to C:\\python27 and select 'ok'<\/code><\/li>\n<li><code>Select 'Move Down' and repeat step 3 for C:\\python27\\Scripts<\/code><\/li>\n<\/ul>\n<p><u>3: Open a new CMD prompt (<code>Windows Key + R, cmd.exe<\/code>)<\/u><\/p>\n<p><u>4: Install virtualenv through the command pip install virtualenv. If you are not an administrator do not update if prompted<\/u><\/p>\n<p><u>5: Check that virtualenv is install through the command pip &#8211;version<\/u><\/p>\n<p><u>6: Install VirtualEnvWrapper-win through the command pip install VirtualEnvWrapper-win<\/u><\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Python_Virtualenv_Python_Version_in_Linux\"><\/span><strong>2: Python Virtualenv Python Version in Linux<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Get start<\/p>\n<p><strong><u>1: Virtual Environments on Python 2.7<\/u><\/strong><\/p>\n<ul>\n<li><code>Create a virtual environment in your current directory for a project with the command: virtualenv my project<\/code><\/li>\n<li><code>\"my project\" is whatever name you would like to give this environment<\/code><\/li>\n<li><code>To create a virtual environment with a specific version of python use the command: virtualenv -p \/usr\/bin\/python2.7 my project<\/code><\/li>\n<li><code>\"python2.7\" can be replaced with the version you would like to use<\/code><\/li>\n<\/ul>\n<p><strong><u>2: Virtual Environments on Python 3.5+<\/u><\/strong><\/p>\n<ul>\n<li><code>Create a virtual environment in your current directory for a project with the command: python3 -m venv my project<\/code><\/li>\n<li><code>\"my project\" is whatever name you would like to give this environment<\/code><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Good_luck\"><\/span><strong>Good luck!<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Related Article<\/strong><\/p>\n<ul>\n<li><span style=\"color: #ff9900;\"><strong><a style=\"color: #ff9900;\" href=\"https:\/\/arzhost.com\/blogs\/python-3-install-pip3\/\">python 3 install pip3<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #ff9900;\"><strong><a style=\"color: #ff9900;\" href=\"https:\/\/arzhost.com\/blogs\/python-activate-virtual-environment\/\">python activate virtual env<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #ff9900;\"><strong><a style=\"color: #ff9900;\" href=\"https:\/\/arzhost.com\/blogs\/python3-create-virtual-environment\/\">python3 creates virtual env<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #ff9900;\"><strong><a style=\"color: #ff9900;\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/\">Create Virtual Environment Python 3<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #ff9900;\"><strong><a style=\"color: #ff9900;\" href=\"https:\/\/arzhost.com\/blogs\/make-virtual-env-python3\/\">Make Virtual Env Python3<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #ff9900;\"><strong><a style=\"color: #ff9900;\" 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>There is nothing more annoying in a data science project than a library. That is incompatible with the Python Virtualenv Python Version you are using. Occasionally, all you need to do is set up a virtual environment with a different Python version. First of all, I&#8217;m sorry to break it to you if you use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3331,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,29,16,19],"tags":[],"table_tags":[],"class_list":["post-3106","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\/3106","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=3106"}],"version-history":[{"count":4,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3106\/revisions"}],"predecessor-version":[{"id":13867,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3106\/revisions\/13867"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media\/3331"}],"wp:attachment":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media?parent=3106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/categories?post=3106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/tags?post=3106"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/table_tags?post=3106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}