{"componentChunkName":"component---src-pages-author-author-yaml-id-js","path":"/author/ashish-maharjan/","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"id":"a516b1da-8778-5e1c-b78b-e11c71e38c33","html":"<p>In this article, we'll talk about the basic concept of virtual environment in python -  what it is and how to use it and also how to build and manage separate environments for your Python projects using virtual environments. </p>\n<h2 id=\"what-is-a-virtual-environment\" style=\"position:relative;\"><a href=\"#what-is-a-virtual-environment\" aria-label=\"what is a virtual environment permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is a virtual environment?</h2>\n<p>A virtual environment is simply a tool that separates the dependencies of different projects by creating a separate isolated environment for each project.</p>\n<p>These are simply the directories so that unlimited virtual environments can be created. This is one of the popular tools used by most of the Python developers.</p>\n<h2 id=\"why-do-we-need-a-virtual-environment\" style=\"position:relative;\"><a href=\"#why-do-we-need-a-virtual-environment\" aria-label=\"why do we need a virtual environment permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why do we need a virtual environment?</h2>\n<p><a href=\"/python-basics-in-minutes/\">Python has various modules</a> and packages for different applications. During our project, it may require a third-party library, which we install. Another project also uses the same directory for retrieval and storage but doesn't require any other third-party packages.</p>\n<p>So, the virtual environment can come into play and make a separate isolated environment for both projects, and each project can store and retrieve packages from their specific environment.</p>\n<p>Also, let us consider another case where we are creating a web application <a href=\"https://www.djangoproject.com/start/\">using Django</a>. Suppose you are working on two projects project1 and project2. </p>\n<p>If project1 uses Django-2.2 and project2 uses Django-3.2, they would be stored in the same directory with the same name, and the error may occur. Then, in such cases, virtual environments can be really helpful for you to maintain the dependencies of both the projects.</p>\n<h2 id=\"how-does-a-virtual-environment-work\" style=\"position:relative;\"><a href=\"#how-does-a-virtual-environment-work\" aria-label=\"how does a virtual environment work permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How does a virtual environment work?</h2>\n<p>To create a virtual environment, we need a <a href=\"https://pypi.org/project/virtualenv/\">module named</a> virtualenv. It creates a folder with all the necessary executables to run Python projects. Make sure <strong>pip</strong> is installed on your computer. If not, then use the following command:</p>\n<p><span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 331px; \">\n      <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 9.969788519637461%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAYklEQVQI1x2MWQoAIBBCO1VBC61UtND9T2M4H4PzVFRzTlhrce9FCAE5Z9Dz3uO9B2MMSinovYsyozfGEI9aa0VKCXtvKIJzToAjZBb5n3OgtZYyx3jMObjWEm6tSR5jlI0PV0RHC9U/CxwAAAAASUVORK5CYII='); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Pip\" title=\"Pip\" src=\"/static/45276ff2f7856aff2fc418e38b5bb086/62452/pip.png\" srcset=\"/static/45276ff2f7856aff2fc418e38b5bb086/62452/pip.png 331w\" sizes=\"(max-width: 331px) 100vw, 331px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n    </span><br></p>\n<h3 id=\"install-virtualenv\" style=\"position:relative;\"><a href=\"#install-virtualenv\" aria-label=\"install virtualenv permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install virtualenv:</h3>\n<p>Open the terminal and paste the following command to install a virtualenv:</p>\n<p><span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 239px; \">\n      <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 11.297071129707113%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAaElEQVQI1zWMOQpEIRBE/7FUNHFFUQTFwNz7X6GGapioumt5X+8dWmu01uC9h1IKKSXknFFKEa21wjknGT3m1BCCZLxjjLj34iOQo3MO1lowxgh8zinlMYaotVag7P8he2/52eHmvYcfyuJJjX1xfG8AAAAASUVORK5CYII='); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Install\" title=\"Install\" src=\"/static/5af461d00e70d9d16783fde12bb3c2a1/4a279/install.png\" srcset=\"/static/5af461d00e70d9d16783fde12bb3c2a1/4a279/install.png 239w\" sizes=\"(max-width: 239px) 100vw, 239px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n    </span><br></p>\n<h3 id=\"check-your-version-of-virtualenv\" style=\"position:relative;\"><a href=\"#check-your-version-of-virtualenv\" aria-label=\"check your version of virtualenv permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Check your version of virtualenv:</h3>\n<p>If you want to confirm whether it is installed or not, paste the command below in your terminal:</p>\n<p><span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 218px; \">\n      <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 10.550458715596331%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAaUlEQVQI1zWNSQpEIRBD/510oeDGAcUBRV14/5OkSUEvHoFUkvrWWlBKofeOGKNoCAG1VrTWkHMWpae1hjEGzjnxmCmlCCkl8b69N6y14PAYQ47U956Mzzlx75UyHzPrvQd75J8h5xz8AMv8SUjXRbReAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Check\" title=\"Check\" src=\"/static/b0b9c719b641e238a80752140d3670b0/5c416/check.png\" srcset=\"/static/b0b9c719b641e238a80752140d3670b0/5c416/check.png 218w\" sizes=\"(max-width: 218px) 100vw, 218px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n    </span><br></p>\n<h3 id=\"create-a-virtual-environment\" style=\"position:relative;\"><a href=\"#create-a-virtual-environment\" aria-label=\"create a virtual environment permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Create a virtual environment:</h3>\n<p>After successful installation of virtualenv, now you can create a virtual environment with your desired name using following command:</p>\n<p><span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 173px; \">\n      <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 15.606936416184972%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAo0lEQVQI1z2OzQqEMAyEfaXa1n9txQVvK57UoqLorWBh3x9mNzns4SNkJhkmssYgTVMIIaCUQpZl0FqjqirWiDzPkSQJpJTsxXH8hzSCfmmP/PPBMLw5YNs2zPOM4ziwLAumaYL3Hvu+Y11X3PeN8zxxXRc/j+PItyEE9p1ziLruhbIsuUFd1zC/xhROTdu2Rd/37JNHOk1rLQcWRYGmaRjSiS9Bs2uaEQAvvgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Check\" title=\"Check\" src=\"/static/a7f6533ac0491384606c3829a615961c/991de/name.png\" srcset=\"/static/a7f6533ac0491384606c3829a615961c/991de/name.png 173w\" sizes=\"(max-width: 173px) 100vw, 173px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n    </span><br></p>\n<p>Here, I created <code>venv</code> as the name of my virtual environment. You can name it whatever you desire. The folder with the name <code>venv</code> is created that contains all the necessary executables to <a href=\"/speed-up-python-code/\">run the Python project</a>. This is the folder where all your python packages will run.</p>\n<p>To specify the Python interpreter of your choice, you can do it easily by specifying Python{version-name}.\nEg: To create python2.7 virtual environment, we use following command:</p>\n<p><span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 267px; \">\n      <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 9.737827715355804%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAZElEQVQI1z1ORwoAIAzzV4qKgrhw4tX//yPSHjwU0gwSYYxBKQUpJbTWkHNGCAFaa1hr4b1HjPF7CNPVWuGcg5Tya/QLAvdeJs45GGOwgUSl1A9T0VqL9d475pycodK9N/M05AGDMEhAYlM7dwAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Version\" title=\"Version\" src=\"/static/087c713522e4864919d656de11b83948/19e8f/version.png\" srcset=\"/static/087c713522e4864919d656de11b83948/19e8f/version.png 267w\" sizes=\"(max-width: 267px) 100vw, 267px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n    </span><br></p>\n<p>After successfully creating the virtual environment, you need to activate it to enter into that particular isolated environment. Always remember to activate the required virtual environment before working on the project. To activate it, we move to the location where the name of your desired virtual environment is located and follow the command below:</p>\n<p><span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 257px; \">\n      <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 10.505836575875485%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAaElEQVQI1zWNOQ5EIQxD/6UoQOyiYoeC+9/EI0eaIkry7MTfOQchBLz3sNbCnBO9dxhjsPeWGmNI0UO91gresZO31nDvFfbxmdYapRTEGGGtlQClFFJK8N4LZ8B/d84h5yyMM/3U6PsBTEVIfCCX9AcAAAAASUVORK5CYII='); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Activate\" title=\"Activate\" src=\"/static/31d62d4aadcaa0cb12d7b74df382c6ed/96e35/activate.png\" srcset=\"/static/31d62d4aadcaa0cb12d7b74df382c6ed/96e35/activate.png 257w\" sizes=\"(max-width: 257px) 100vw, 257px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n    </span><br></p>\n<p><strong>Note:</strong> Instead of <code>venv</code>, you write the name of your virtual environment you created.<br></p>\n<h4 id=\"in-windows\" style=\"position:relative;\"><a href=\"#in-windows\" aria-label=\"in windows permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>In Windows,</h4>\n<p><span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 230px; \">\n      <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 12.173913043478262%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAZklEQVQI12WLRwoFIRQE50wmEK8gYgBzuP8p+uODP5tZFBRN9XPOgTEGc06stVBrhbUWrTWUUhBCwN6biDHCOUdtzhnee6SUMMZA752+j5QSnHOCMfa6EIK4m9Yat7t+N6XUp/v/f+VRSBk6ycwKAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Windows\" title=\"Windows\" src=\"/static/854d4c8e0a7a976f6073e8a8c04f31cd/81c8e/windows.png\" srcset=\"/static/854d4c8e0a7a976f6073e8a8c04f31cd/81c8e/windows.png 230w\" sizes=\"(max-width: 230px) 100vw, 230px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n    </span><br></p>\n<p>After activating the virtual environment, you can see your name on the virtual environment on the terminal's left side. It confirms the activation of your virtual environment and is currently active. </p>\n<p><span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 385px; \">\n      <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 7.2727272727272725%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAABCAYAAADeko4lAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAT0lEQVQI1x3IQQqAIBQA0S4TKu2KSisKxIyv1qr7X2WSVm+YRkQoJXOGiN173NNixeCKwt0Km/Tfk+/q18zRsOTqutJvieF4qsLoX8KV+ABY6iJCz00hnQAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Activated\" title=\"Activated\" src=\"/static/09e527bc0e7a499269e4c7d7c6dcb030/409e6/activated.png\" srcset=\"/static/09e527bc0e7a499269e4c7d7c6dcb030/409e6/activated.png 385w\" sizes=\"(max-width: 385px) 100vw, 385px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n    </span><br></p>\n<p>Finally, you successfully created and activated your virtual environment. Now, you can install the dependencies and requirements your project asks for without interfering with other projects.</p>\n<p>Once you completed your work, then you can return to the system default environment by just using the <strong>deactivate</strong> command as shown below:</p>\n<span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 123px; \">\n      <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 21.13821138211382%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA1UlEQVQY001QywqDQAz0h6qur4OiLujBCmqRiigq6kWQPg76BaX0t6dNaKGHIcnMJpOsImWIPC+gqip0XUcQBHBdF0II2LbNnOM4kFLC931EUQTLslgnnvI4jrk2TRPKebjg9XzgcFARhiH2fce2bej7HtM0YVmWj2GOtm1RVRWKokDTNBjHkSPplNd1jXVdoUTHE+6362cTAc/zMAwDuq7j5nmeuSnLMt4iTVPmyaAsSzahQUmSME+1YpkGhGHA+ELTND7/Fwl0DmkUCfQNpP/e/Pe9AdslkRuE0PJOAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Deactivate\" title=\"Deactivate\" src=\"/static/7b1f3953b29c3d15d6fe5cd668f5024d/439d7/deactivate.png\" srcset=\"/static/7b1f3953b29c3d15d6fe5cd668f5024d/439d7/deactivate.png 123w\" sizes=\"(max-width: 123px) 100vw, 123px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n    </span>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"title":"Python Virtual Environment: What is it and how it works?","author":{"id":"Ashish Maharjan","github":"AshishMhrzn10","avatar":null},"date":"October 16, 2020","updated_date":null,"tags":["Python"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":2.127659574468085,"src":"/static/a922fe6c69816a3fd3c995d0f175a96c/14b42/python.jpg","srcSet":"/static/a922fe6c69816a3fd3c995d0f175a96c/f836f/python.jpg 200w,\n/static/a922fe6c69816a3fd3c995d0f175a96c/2244e/python.jpg 400w,\n/static/a922fe6c69816a3fd3c995d0f175a96c/14b42/python.jpg 800w,\n/static/a922fe6c69816a3fd3c995d0f175a96c/35d76/python.jpg 1171w","sizes":"(max-width: 800px) 100vw, 800px"}}}},"fields":{"authorId":"Ashish Maharjan","slug":"/engineering/python-virtual-environments/"}}}]},"authorYaml":{"id":"Ashish Maharjan","bio":"Just a beginner trying to learn more and more","github":"AshishMhrzn10","stackoverflow":null,"linkedin":"%C3%A3shish-mhrzn-59b7b4188","medium":null,"twitter":null,"avatar":null}},"pageContext":{"id":"Ashish Maharjan","__params":{"id":"ashish-maharjan"}}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}