{"id":23946,"date":"2022-09-08T16:04:01","date_gmt":"2022-09-08T10:34:01","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=23946"},"modified":"2022-09-08T16:04:05","modified_gmt":"2022-09-08T10:34:05","slug":"python-virtualenv-location","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/","title":{"rendered":"The A-Z of Python Virtualenv Location"},"content":{"rendered":"\n<p>In this article, we will be covering the topic of Python Virtualenv (Virtual Environment). What is a virtual environment?<\/p>\n\n\n\n<p><strong>A virtual environment is a tool that creates individual python environments to separate projects with different dependencies or software versions.<\/strong><\/p>\n\n\n\n<p>Let&#8217;s take the following scenario. <\/p>\n\n\n\n<p>A Programmer wants to work on multiple projects with different versions of Python at the same time. How is this achieved? <\/p>\n\n\n\n<p>By creating virtual environments, they can work on multiple projects with their own versions of Python, PIP, and a <a href=\"http:\/\/www.pythonpool.com\/python-decouple\/\" target=\"_blank\" rel=\"noopener\">separate<\/a> location for external dependencies, all within the same computer. <\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">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: #990303;color:#990303\" 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: #990303;color:#990303\" 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 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#How_To_Create_A_Virtual_Environment\" >How To Create A Virtual Environment?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#About_the_Module_%E2%80%93_virtualenv\" >About the Module &#8211; virtualenv<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#Installing_the_Module\" >Installing the Module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#Creating_A_Virtual_Environment\" >Creating A Virtual Environment<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#How_To_Find_the_Location_Of_Your_Virtual_Environment\" >How To Find the Location Of Your Virtual Environment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#How_to_Change_the_Path_of_the_Virtual_Environment\" >How to Change the Path of the Virtual Environment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#Where_are_the_Virtual_Environments_Created\" >Where are the Virtual Environments Created?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#What_is_Python_virtualenv_env_File\" >What is Python virtualenv .env File?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#How_To_Setup_Virtual_Environments_in_VS_Code\" >How To Setup Virtual Environments in VS Code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#What_is_Python_Virtualenvs_Directory_Structure\" >What is Python Virtualenv&#8217;s Directory Structure?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#How_To_Run_Separate_PIP_Config_Files_in_Virtualenv\" >How To Run Separate PIP Config Files in Virtualenv<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#How_to_Activate_the_virtualenv_and_Run_a_Python_Script\" >How to Activate the virtualenv and Run a Python Script<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#FAQs_on_Python_Virtualenv_Location\" >FAQs on Python Virtualenv Location<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#Trending_Python_Articles\" >Trending Python Articles<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-how-to-create-a-virtual-environment\"><span class=\"ez-toc-section\" id=\"How_To_Create_A_Virtual_Environment\"><\/span>How To Create A Virtual Environment?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-about-the-module-virtualenv\"><span class=\"ez-toc-section\" id=\"About_the_Module_%E2%80%93_virtualenv\"><\/span>About the Module &#8211; virtualenv<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The virtualenv module allows the creation of separate Python environments. Virtualenv creates folders consisting of all the required executables to use external dependencies a project requires.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-installing-the-module\"><span class=\"ez-toc-section\" id=\"Installing_the_Module\"><\/span>Installing the Module <span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The module is NOT a part of the Python Standard Library. Install it manually via PIP using the following command. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Command for Windows and Linux\/Mac<\/strong>\n<code>pip install virtualenv<\/code><\/pre>\n\n\n\n<p>As of 2022, the latest version is <strong>virtualenv 20.16.3<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-creating-a-virtual-environment\"><span class=\"ez-toc-section\" id=\"Creating_A_Virtual_Environment\"><\/span>Creating A Virtual Environment<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Create a virtual environment using the below command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>virtualenv your_project_name<\/code><\/pre>\n\n\n\n<p>Upon execution,  the directory <code>your_project_name<\/code> is created. In this directory, all the required executables to use external dependencies for a project is present. <\/p>\n\n\n\n<p>To specify the version of the Python interpreter for the virtual environment, run the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>virtualenv -p \/usr\/bin\/ [enviornment name]<\/code>\n\n\n<strong>Creating a enviornment with Python 3.9<\/strong>\n<code>virtualenv -p \/usr\/bin\/python3.9 my_Enviornment3.9<\/code>\n\n<strong>Creating a enviornment with Python 2.7\n<\/strong><code>virtualenv -p \/usr\/bin\/python2.7 my_Enviornment2.7<\/code><\/pre>\n\n\n\n<p>Note that different virtual environments can have different versions of Python. <\/p>\n\n\n\n<p>In order to work on a specific environment, you must activate it using the following command. <\/p>\n\n\n\n<p>If you have multiple environments, be sure to activate the appropriate one<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source [enviornment name]\/bin\/activate<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-find-the-location-of-your-virtual-environment\"><span class=\"ez-toc-section\" id=\"How_To_Find_the_Location_Of_Your_Virtual_Environment\"><\/span>How To Find the Location Of Your Virtual Environment <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The activated virtual environment&#8217;s location can be found using the &#8220;<code>which<\/code>&#8221; keyword. Let&#8217;s look at the following example<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>$ which [your environment's name]<\/code>\n\n<strong>Sample Output<\/strong>\n\/Users\/Adimn\/Documents\/myEnvironment<\/pre>\n\n\n\n<p>The first matched location is displayed by default. To display all available matches, pass the <code>-a<\/code> argument to show all.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>$ which -a [your environment's name]<\/code>\n\n<strong>Sample Output<\/strong>\n\/Users\/Admin\/Documents\/venv\/myEnvironment\n\/Users\/Admin\/myProjects\/venv\/myEnvironment<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-change-the-path-of-the-virtual-environment\"><span class=\"ez-toc-section\" id=\"How_to_Change_the_Path_of_the_Virtual_Environment\"><\/span>How to Change the Path of the Virtual Environment <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The virtualenv module provides an option to change the path of your virtual environment. The <code>relocatable<\/code> command achieves this. <\/p>\n\n\n\n<p>All virtual environments are located on a specific path. A virtual environment cannot be manually relocated or transferred to another system. To change the path of a virtual environment, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>$ virtualenv --relocatable [Your Environnment Name]<\/code><\/pre>\n\n\n\n<p>Make sure to run the command outside your environment directory. This will force the files created by setup tools or distribution to use relative paths. If you install a new package into a relocatable environment, run &#8211;relocatable again.<\/p>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-india monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending:<\/span><span class=\"monsterinsights-inline-popular-posts-border\" ><\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\">[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-where-are-the-virtual-environments-created\"><span class=\"ez-toc-section\" id=\"Where_are_the_Virtual_Environments_Created\"><\/span>Where are the Virtual Environments Created?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The virtualenv module creates a file within the project directory. The folder is called <code>venv<\/code>, but the name can be changed accordingly. The venv file consists of Python PIP .exe files. <\/p>\n\n\n\n<p>External dependencies of an activated virtual environment are installed within the venv file. Any other modules installed after activation are installed within the particular project&#8217;s venv folder. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-python-virtualenv-env-file\"><span class=\"ez-toc-section\" id=\"What_is_Python_virtualenv_env_File\"><\/span>What is Python virtualenv .env File?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>With the help of a .env file, we can use environment variables for local development. A .env file separates environment variables from similar projects that utilize them. <\/p>\n\n\n\n<p>A .env file consists of key-value elements of the necessary environment variables for the program. The file is usually included within the virtualenv directory. <\/p>\n\n\n\n<p>To read environment variables from the <code>.env<\/code> file, the <strong>python-dotenv<\/strong> module is used. Upon installation, you can read env files using the following function:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom dotenv import load_dotenv\n\nload_dotenv(path\/example\/.env')\n<\/pre><\/div>\n\n\n<p>Upon execution, <code>load_dotenv()<\/code> will look for env files and load the variables. Therefore, all variables from the env file are now accessible globally in your program. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-setup-virtual-environments-in-vs-code\"><span class=\"ez-toc-section\" id=\"How_To_Setup_Virtual_Environments_in_VS_Code\"><\/span>How To Setup Virtual Environments in VS Code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In Visual Studio Code, it is simple to create a Virtual Environment. Let&#8217;s look at the following step to create Python Virtualenv Location.<\/p>\n\n\n\n<p>Create a Python Terminal within VS Code by pressing Ctrl+Shift+P<\/p>\n\n\n\n<p>In the terminal, type the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">python -m venv venv<\/pre>\n\n\n\n<p>The following dialog will pop up:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"644\" height=\"145\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/08\/image-17.png\" alt=\"How To Setup Virtual Environments in VS Code\" class=\"wp-image-24050\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/08\/image-17.png 644w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/08\/image-17-300x68.png 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/figure>\n\n\n\n<p>Click yes to create the virtual environment. Install necessary external modules using PIP.<\/p>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-kilo monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Popular now<\/span><span class=\"monsterinsights-inline-popular-posts-border\" ><\/span><span class=\"monsterinsights-inline-popular-posts-border-2\" ><\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\">[Fixed] nameerror: name Unicode is not defined<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-python-virtualenv-s-directory-structure\"><span class=\"ez-toc-section\" id=\"What_is_Python_Virtualenvs_Directory_Structure\"><\/span>What is Python Virtualenv&#8217;s Directory Structure?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Python virtual environment has a simple directory and file structure. It consists of a &#8220;bin&#8221; sub-directory that contains a Python interpreter and Python modules installed in the environment. By calling the interpreter in the bin sub-directory, Python uses the installed packages in the virtualenv. <\/p>\n\n\n\n<p>Upon creating an environment, we can call it via <a href=\"http:\/\/www.pythonpool.com\/python-disable-path-length-limit\/\" target=\"_blank\" rel=\"noopener\">Python using the path<\/a> to the bin sub-directory in the venv folder. For example, <code>samplevenv\/bin\/python hello_world.py<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-run-separate-pip-config-files-in-virtualenv\"><span class=\"ez-toc-section\" id=\"How_To_Run_Separate_PIP_Config_Files_in_Virtualenv\"><\/span>How To Run Separate PIP Config Files in Virtualenv<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p> We can run config files based on what virtualenv is being worked on. Let&#8217;s see how that is achieved. Within the command line, run the following command based on the environment:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">~\/.pip\/pip.conf\n\n<strong>Run:<\/strong>\n ~\/.samplenv\/environment1\/pip.conf\n ~\/.samplenv\/environment2\/pip.conf\n... and so on.<\/pre>\n\n\n\n<p>NOTE: each config will be inherited from:  ~\/.pip\/pip.conf<\/p>\n\n\n\n<p>The environment will overwrite each config file. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-activate-the-virtualenv-and-run-a-python-script\"><span class=\"ez-toc-section\" id=\"How_to_Activate_the_virtualenv_and_Run_a_Python_Script\"><\/span>How to Activate the virtualenv and Run a Python Script<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>It is possible to automate the process of activating a virtualenv and running Python scripts with the help of Batch files. <\/p>\n\n\n\n<p>In the following example, we are activating the virtual environment and running the required Python Script.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Sample.bat:<\/strong>\n@echo off\ncmd \/k \"cd \/d C:\\Users\\Admin\\Desktop\\venv\\Scripts &amp; activate &amp; cd \/d    C:\\Users\\Admin\\Desktop\\helloworld &amp; python helloworld.py doSomething\"<\/pre>\n\n\n\n<p>This activates the virtual environment and runs the script &#8220;helloworld.py&#8221;<\/p>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-beta monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-image\"><a href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal.webp 1200w \" alt=\"[Solved] runtimeerror: cuda error: invalid device ordinal\" \/><\/a><\/div><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\">[Solved] runtimeerror: cuda error: invalid device ordinal<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-faqs-on-python-virtualenv-location\"><span class=\"ez-toc-section\" id=\"FAQs_on_Python_Virtualenv_Location\"><\/span>FAQs on Python Virtualenv Location<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1661226940931\"><strong class=\"schema-faq-question\">How do I see virtual environments in Python?<\/strong> <p class=\"schema-faq-answer\">You can see virtual environments using virtualenv. Python virtualenv location can also be found within the project directory.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1661227675787\"><strong class=\"schema-faq-question\">Where should you create virtual environments for your projects?<\/strong> <p class=\"schema-faq-answer\">The virtualenv module will store the necessary executables within your project directory under a file called venv. All .exe related to the virtual environment must be created within the project folder. <\/p> <\/div> <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have discussed a vital feature in Python programming called virtual environments. Virtual environments allow programmers to work on multiple projects with different dependencies within the same machine simultaneously. The Python virtualenv module enables the creation of such virtual environments. We&#8217;ve reviewed various techniques to fetch Python virtualenv <a href=\"http:\/\/www.pythonpool.com\/uszipcode-python\/\" target=\"_blank\" rel=\"noopener\">location<\/a>.<\/p>\n\n\n<div class=\"monsterinsights-widget-popular-posts monsterinsights-widget-popular-posts-delta monsterinsights-popular-posts-styled monsterinsights-widget-popular-posts-columns-2\"><h2 class=\"monsterinsights-widget-popular-posts-widget-title\"><span class=\"ez-toc-section\" id=\"Trending_Python_Articles\"><\/span>Trending Python Articles<span class=\"ez-toc-section-end\"><\/span><\/h2><ul class=\"monsterinsights-widget-popular-posts-list\"><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_.webp 1200w \" alt=\"[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 11, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined.webp 1200w \" alt=\"[Fixed] nameerror: name Unicode is not defined\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] nameerror: name Unicode is not defined<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal.webp 1200w \" alt=\"[Solved] runtimeerror: cuda error: invalid device ordinal\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Solved] runtimeerror: cuda error: invalid device ordinal<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-type-numpy-ndarray-doesnt-define-__round__-method\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method.webp 1200w \" alt=\"[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><\/ul><\/div><p><\/p>","protected":false},"excerpt":{"rendered":"<p>In this article, we will be covering the topic of Python Virtualenv (Virtual Environment). What is a virtual environment? A virtual environment is a tool &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"The A-Z of Python Virtualenv Location\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#more-23946\" aria-label=\"More on The A-Z of Python Virtualenv Location\">Read more<\/a><\/p>\n","protected":false},"author":28,"featured_media":24166,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4345,15],"tags":[5435,5438,5436],"class_list":["post-23946","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-module","category-tutorials","tag-python-venv-add-path","tag-python-virtualenv-batch-file","tag-python-virtualenv-location","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.1 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The A-Z of Python Virtualenv Location - Python Pool<\/title>\n<meta name=\"description\" content=\"In this article, we will be covering the topic, of Python Virtualenv (Virtual Environment). How do we find Python virtualenv location?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The A-Z of Python Virtualenv Location\" \/>\n<meta property=\"og:description\" content=\"In this article, we will be covering the topic of Python Virtualenv (Virtual Environment). What is a virtual environment? A virtual environment is a tool\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-08T10:34:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-08T10:34:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Vishnu Venkatesh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:site\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vishnu Venkatesh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/\"},\"author\":{\"name\":\"Vishnu Venkatesh\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/5e8aa48e7557450d345c829305550688\"},\"headline\":\"The A-Z of Python Virtualenv Location\",\"datePublished\":\"2022-09-08T10:34:01+00:00\",\"dateModified\":\"2022-09-08T10:34:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/\"},\"wordCount\":948,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp\",\"keywords\":[\"python venv add path\",\"python virtualenv batch file\",\"python virtualenv location\"],\"articleSection\":[\"Module\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#respond\"]}]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/\",\"url\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/\",\"name\":\"The A-Z of Python Virtualenv Location - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp\",\"datePublished\":\"2022-09-08T10:34:01+00:00\",\"dateModified\":\"2022-09-08T10:34:05+00:00\",\"description\":\"In this article, we will be covering the topic, of Python Virtualenv (Virtual Environment). How do we find Python virtualenv location?\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661226940931\"},{\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661227675787\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp\",\"width\":1200,\"height\":628,\"caption\":\"Python Virtualenv Location\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The A-Z of Python Virtualenv Location\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pythonpool.com\/#website\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"name\":\"Python Pool\",\"description\":\"Your One-Stop Python Learning Destination\",\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pythonpool.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pythonpool.com\/#organization\",\"name\":\"Python Pool\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"contentUrl\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"width\":452,\"height\":185,\"caption\":\"Python Pool\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/pythonpool\",\"https:\/\/www.youtube.com\/c\/pythonpool\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/5e8aa48e7557450d345c829305550688\",\"name\":\"Vishnu Venkatesh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8d399a4488a19871b08a11ebd884e233b04c76d12edc4c7278a79d69df853d75?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8d399a4488a19871b08a11ebd884e233b04c76d12edc4c7278a79d69df853d75?s=96&d=wavatar&r=g\",\"caption\":\"Vishnu Venkatesh\"}},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661226940931\",\"position\":1,\"url\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661226940931\",\"name\":\"How do I see virtual environments in Python?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"You can see virtual environments using virtualenv. Python virtualenv location can also be found within the project directory.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661227675787\",\"position\":2,\"url\":\"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661227675787\",\"name\":\"Where should you create virtual environments for your projects?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The virtualenv module will store the necessary executables within your project directory under a file called venv. All .exe related to the virtual environment must be created within the project folder. \",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"The A-Z of Python Virtualenv Location - Python Pool","description":"In this article, we will be covering the topic, of Python Virtualenv (Virtual Environment). How do we find Python virtualenv location?","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/","og_locale":"en_US","og_type":"article","og_title":"The A-Z of Python Virtualenv Location","og_description":"In this article, we will be covering the topic of Python Virtualenv (Virtual Environment). What is a virtual environment? A virtual environment is a tool","og_url":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/","og_site_name":"Python Pool","article_published_time":"2022-09-08T10:34:01+00:00","article_modified_time":"2022-09-08T10:34:05+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp","type":"image\/webp"}],"author":"Vishnu Venkatesh","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Vishnu Venkatesh","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/"},"author":{"name":"Vishnu Venkatesh","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/5e8aa48e7557450d345c829305550688"},"headline":"The A-Z of Python Virtualenv Location","datePublished":"2022-09-08T10:34:01+00:00","dateModified":"2022-09-08T10:34:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/"},"wordCount":948,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp","keywords":["python venv add path","python virtualenv batch file","python virtualenv location"],"articleSection":["Module","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/python-virtualenv-location\/#respond"]}]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/","url":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/","name":"The A-Z of Python Virtualenv Location - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp","datePublished":"2022-09-08T10:34:01+00:00","dateModified":"2022-09-08T10:34:05+00:00","description":"In this article, we will be covering the topic, of Python Virtualenv (Virtual Environment). How do we find Python virtualenv location?","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661226940931"},{"@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661227675787"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/python-virtualenv-location\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/09\/Python-Virtualenv-Location.webp","width":1200,"height":628,"caption":"Python Virtualenv Location"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"The A-Z of Python Virtualenv Location"}]},{"@type":"WebSite","@id":"https:\/\/www.pythonpool.com\/#website","url":"https:\/\/www.pythonpool.com\/","name":"Python Pool","description":"Your One-Stop Python Learning Destination","publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pythonpool.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pythonpool.com\/#organization","name":"Python Pool","url":"https:\/\/www.pythonpool.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","contentUrl":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","width":452,"height":185,"caption":"Python Pool"},"image":{"@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/pythonpool","https:\/\/www.youtube.com\/c\/pythonpool"]},{"@type":"Person","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/5e8aa48e7557450d345c829305550688","name":"Vishnu Venkatesh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8d399a4488a19871b08a11ebd884e233b04c76d12edc4c7278a79d69df853d75?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8d399a4488a19871b08a11ebd884e233b04c76d12edc4c7278a79d69df853d75?s=96&d=wavatar&r=g","caption":"Vishnu Venkatesh"}},{"@type":"Question","@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661226940931","position":1,"url":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661226940931","name":"How do I see virtual environments in Python?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"You can see virtual environments using virtualenv. Python virtualenv location can also be found within the project directory.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661227675787","position":2,"url":"https:\/\/www.pythonpool.com\/python-virtualenv-location\/#faq-question-1661227675787","name":"Where should you create virtual environments for your projects?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"The virtualenv module will store the necessary executables within your project directory under a file called venv. All .exe related to the virtual environment must be created within the project folder. ","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/23946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=23946"}],"version-history":[{"count":24,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/23946\/revisions"}],"predecessor-version":[{"id":24491,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/23946\/revisions\/24491"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/24166"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=23946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=23946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=23946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}