{"id":2554,"date":"2020-05-03T21:02:27","date_gmt":"2020-05-03T21:02:27","guid":{"rendered":"https:\/\/www.arzhost.com\/?p=1495"},"modified":"2025-08-18T15:22:36","modified_gmt":"2025-08-18T10:22:36","slug":"create-virtual-environment-python-3","status":"publish","type":"post","link":"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/","title":{"rendered":"The Easy Guide to Creating Virtual Environments Python 3"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#Understanding_Isolated_Python_Environments\" >Understanding Isolated Python Environments<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#Importance_and_Benefits_of_Using_Isolated_Environments\" >Importance and Benefits of Using Isolated Environments<\/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\/create-virtual-environment-python-3\/#Difference_Between_Virtualenv_and_Venv_Comparing_Two_Popular_Tools\" >Difference Between Virtualenv and Venv: Comparing Two Popular Tools<\/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\/create-virtual-environment-python-3\/#Installing_Virtualenv_Using_pip3_Installation_Guide\" >Installing Virtualenv Using pip3: Installation Guide<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#Upgrade_Your_Hosting_Experience%E2%80%94Exclusive_90_Discount_Awaits\" >Upgrade Your Hosting Experience\u2014Exclusive 90% Discount Awaits!<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#Custom_Versioned_Python_3_Managing_Different_Python_Versions\" >Custom Versioned Python 3: Managing Different Python Versions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#How_to_Create_a_Virtualenv_Using_a_Custom_Python\" >How to Create a Virtualenv Using a Custom Python<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#Python_Installation_Instructions_Detailed_Steps_for_Installing_Python\" >Python Installation Instructions: Detailed Steps for Installing Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#Deactivating_your_Virtualenv_Safely_Exiting_the_Virtual_Environment\" >Deactivating your Virtualenv: Safely Exiting the Virtual Environment<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#How_to_Delete_a_Virtual_Environment_Removing_Unneeded_Environments\" >How to Delete a Virtual Environment: Removing Unneeded Environments<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#How_to_Install_Custom_Modules_in_Python_Adding_Modules\" >How to Install Custom Modules in Python: Adding Modules<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#Launch_Your_Own_Hosting_Business%E2%80%94Sign_Up_Now\" >Launch Your Own Hosting Business\u2014Sign Up Now!<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#How_to_Troubleshoot_the_Following_Problems\" >How to Troubleshoot the Following Problems<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#You_Can_Face_an_Error_While_Creating_a_Virtualenv_Common_Issues\" >You Can Face an Error While Creating a Virtualenv: Common Issues<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/arzhost.com\/blogs\/create-virtual-environment-python-3\/#Using_the_Full_Path_to_Your_Custom_Virtualenv_Ensuring_Proper_Path_Usage\" >Using the Full Path to Your Custom Virtualenv: Ensuring Proper Path Usage<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Understanding_Isolated_Python_Environments\"><\/span>Understanding Isolated Python Environments<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Create Virtual Environment Python 3 application uses modules and packages that are not included in the standard library. These applications often require a specific version of the library. The reason is the app often demands to resolve a particular bug or to write an application in an obsolete version.<\/p>\n\n\n\n<p>It is easy to resolve this problem by creating a virtual environment in python 3. It is a self-contained directory tree. In addition to various additional packages, it includes a particular version of python installation.<\/p>\n\n\n\n<p>For more guides like this, visit our <a href=\"https:\/\/arzhost.com\/blogs\/\"><strong>Blog<\/strong><\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Importance_and_Benefits_of_Using_Isolated_Environments\"><\/span><strong>Importance and Benefits of Using Isolated Environments<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>A virtual environment (Virtualenv) is a means to make an isolated python environment. Having its installation directories, virtualenv does not share its libraries with other virtual environments.<\/p>\n\n\n\n<p>Therefore, the virtual environment is recommended and considered the easiest way to organize a custom Python environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Difference_Between_Virtualenv_and_Venv_Comparing_Two_Popular_Tools\"><\/span><strong>Difference Between Virtualenv and Venv<\/strong>: Comparing Two Popular Tools<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Venv comes with <a href=\"https:\/\/arzhost.com\/blogs\/best-python-framework\/\"><strong>Python 3, and Python 2<\/strong><\/a> does not include venv. Virtualenv is a library that delivers more functionality when compared with venv. The following are some features that venv does not contain as compared to virtualenv.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It Venv is slower<\/li>\n\n\n\n<li>Venv is not as extendable,<\/li>\n\n\n\n<li>While Venv cannot make virtual environments for custom installed python versions<\/li>\n\n\n\n<li>Venv cannot be upgraded via pip,<\/li>\n\n\n\n<li>It Venv has not a rich programmatic API<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"536\" title=\"difference between virtualenv and venv\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/difference-between-virtualenv-and-venv-1-1024x536.jpg\" alt=\"difference between virtualenv and venv\" class=\"wp-image-12136\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/difference-between-virtualenv-and-venv-1-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/difference-between-virtualenv-and-venv-1-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/difference-between-virtualenv-and-venv-1-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/difference-between-virtualenv-and-venv-1.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">difference between virtualenv and venv<\/figcaption><\/figure><\/div>\n\n\n<p>Yes, it is right that a virtual environment can be created using venv with python 3, even though you are recommended to install and use virtualenv considering the above features.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installing_Virtualenv_Using_pip3_Installation_Guide\"><\/span><strong>Installing Virtualenv Using pip3: Installation Guide<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Virtual can only be installed on DreamHost servers used for Python 2. While, if it is about Python3, then you must consider and install virtualenv using pip3.<\/p>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-35ffcf87 wp-block-button uag-blocks-common-selector\" style=\"--z-index-desktop:479;;--z-index-tablet:undefined;;--z-index-mobile:undefined;\"><div class=\"uagb-cta__wrap\"><h2 class=\"uagb-cta__title\"><span class=\"ez-toc-section\" id=\"Upgrade_Your_Hosting_Experience%E2%80%94Exclusive_90_Discount_Awaits\"><\/span><a href=\"https:\/\/arzhost.com\/web-hosting\/\" data-type=\"link\" data-id=\"https:\/\/arzhost.com\/web-hosting\/\">Upgrade Your Hosting Experience\u2014Exclusive 90% Discount Awaits!<\/a><span class=\"ez-toc-section-end\"><\/span><\/h2><p class=\"uagb-cta__desc\">Start Your Online Journey Today\u2014Get <strong>90% Off<\/strong> on Your First Hosting Plan!<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/arzhost.com\/web-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_self\" rel=\"noopener noreferrer\">Read More<\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Custom_Versioned_Python_3_Managing_Different_Python_Versions\"><\/span><strong>Custom Versioned Python 3: Managing Different Python Versions<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Generally, pip3 is not installed by default on the server. Therefore, a user requires to install a custom versioned Python 3 first. This customed versioned Python 3 also contains pip3. After installation and activation, you can run following the python3 command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;server]$  python3 -m pip install --upgrade pip<\/code><\/pre>\n\n\n\n<p><strong>Once pip3 is upgraded, you can install virtualenv:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>[server]$ pip3 install virtualenv<\/code> <code>Collecting virtualenv \nDownloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB) 100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.8MB 367kB\/s \nInstalling collected packages: virtualenv Successfully installed virtualenv-15.1.0<\/code><\/pre>\n\n\n\n<p><strong>You will want a full path to Python 3 virtualenv. To meet this need, you can use the following command:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;server]$ which virtualenv\n\/home\/username\/opt\/python-3.6.2\/bin\/virtualenv<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Create_a_Virtualenv_Using_a_Custom_Python\"><\/span><strong>How to Create a Virtualenv Using a Custom Python<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"536\" title=\"how to create a virtualenv using a custom python\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-create-a-virtualenv-using-a-custom-python-1-1024x536.jpg\" alt=\"how to create a virtualenv using a custom python\" class=\"wp-image-12137\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-create-a-virtualenv-using-a-custom-python-1-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-create-a-virtualenv-using-a-custom-python-1-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-create-a-virtualenv-using-a-custom-python-1-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-create-a-virtualenv-using-a-custom-python-1.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">how to create a virtualenv using a custom python<\/figcaption><\/figure><\/div>\n\n\n<p>It is liked more to have a custom versioned python over the server\u2019s version. To <a href=\"https:\/\/arzhost.com\/blogs\/creating-a-virtual-environment-python3\/\"><strong>Create a New Virtualenv<\/strong><\/a> with the use of a custom-installed Python version, you can follow these steps:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Python_Installation_Instructions_Detailed_Steps_for_Installing_Python\"><\/span>Python Installation Instructions: Detailed Steps for Installing Python<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Jot down the full file path installation of custom version python. In the installation article, if you have followed all the instructions, the full path is as;<br><pre class=\"lang:default decode:true \"><code>[server]$ which python3<br>\/home\/username\/opt\/python-3.6.2\/bin\/python<\/code><\/pre><br><\/li>\n\n\n\n<li>You can make a new virtual environment by navigating to the site\u2019s directory:<br><pre class=\"lang:default decode:true \"><code>[server]$ cd ~\/example.com<\/code><\/pre><br><\/li>\n\n\n\n<li>Source your .bash_profile<br><pre class=\"lang:default decode:true \"><code>[server]$ . ~\/.bash_profile<\/code><\/pre><br><\/li>\n\n\n\n<li>Create the virtualenv while you are specifying the version of your desired Python. The following command can be used to create a virtualenv. A flag (-p) is used to determine the full path to the customized Python3 you just installed.<br><pre class=\"lang:default decode:true \"><code>[server]$ virtualenv -p \/home\/example_username\/opt\/python-3.6.2\/bin\/python3 venv<br><br>Run virtualenv with interpreter \/home\/example_username\/opt\/python-3.6.2\/bin\/python3<br>Using base prefix '\/home\/example_username\/opt\/python-3.6.2'<br>New python executable in \/home\/example_username\/example.com\/env\/bin\/python3<br>Also, create executable in \/home\/example_username\/example.com\/env\/bin\/python<br>Install setup tools, pip, wheel...done.<\/code><\/pre><br><\/li>\n\n\n\n<li>You can use the following command for activating the new virtual environment.<br><pre class=\"lang:default decode:true \"><code>[server]$ source venv\/bin\/activate<\/code><\/pre><br><\/li>\n\n\n\n<li>If you verify whether the Python version is correct or not, use the following command.<br><pre class=\"lang:default decode:true\"><code>[server]$ source venv\/bin\/activate[server]$ python -V<br>Python 3.6.2<\/code><\/pre><br><\/li>\n<\/ol>\n\n\n\n<p>Now, you can see the packages have been installed using pip in the folder of the virtual environments project that is isolated from the python installation<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Deactivating_your_Virtualenv_Safely_Exiting_the_Virtual_Environment\"><\/span><strong>Deactivating your Virtualenv: Safely Exiting the Virtual Environment<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Once you have completed your work in the virtual environment and you want to deactivate it, you can run the following command;<\/p>\n\n\n\n<p>[server]$ deactivate<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This command puts you back to the user&#8217;s default settings.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Delete_a_Virtual_Environment_Removing_Unneeded_Environments\"><\/span><strong>How to Delete a Virtual Environment: Removing Unneeded Environments<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If a user wants to remove a create virtual environment, then he can delete it by deleting the project folder, and the following demand can be used.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;server]$ rm -rf venv<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Install_Custom_Modules_in_Python_Adding_Modules\"><\/span><strong>How to Install Custom Modules in Python: Adding Modules<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When working with Python, it is consider <a href=\"https:\/\/arzhost.com\/blogs\/activate-venv-python-3\/\"><strong>good to create and activate a virtual environment<\/strong><\/a>. The reason is that it provides you with an isolated environment. Any work done in this isolated environment does not affect other environments.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"536\" title=\"how to install custom modules in python\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-install-custom-modules-in-python-1-1024x536.jpg\" alt=\"how to install custom modules in python\" class=\"wp-image-12139\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-install-custom-modules-in-python-1-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-install-custom-modules-in-python-1-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-install-custom-modules-in-python-1-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2020\/05\/how-to-install-custom-modules-in-python-1.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">how to install custom modules in python<\/figcaption><\/figure><\/div>\n\n\n<p>To install a custom model, you can use pip3;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a virtual environment after installing a custom versioned Python 3.<\/li>\n\n\n\n<li>You must be assure you are in the same directory of the creat virtual environment.<\/li>\n\n\n\n<li>Now use the following command to activate the Virtualenv.<br><pre class=\"lang:default decode:true \"><code>[server]$ source venv\/bin\/activate<\/code><\/pre><\/li>\n\n\n\n<li>Use pip3 to install a module by the following command:<br><pre class=\"lang:default decode:true \"><code>(venv) [server]$ pip3 install &lt;module&gt;<\/code><\/pre><\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-cf5921a7 wp-block-button uag-blocks-common-selector\" style=\"--z-index-desktop:479;;--z-index-tablet:undefined;;--z-index-mobile:undefined;\"><div class=\"uagb-cta__wrap\"><h2 class=\"uagb-cta__title\"><span class=\"ez-toc-section\" id=\"Launch_Your_Own_Hosting_Business%E2%80%94Sign_Up_Now\"><\/span><a href=\"https:\/\/arzhost.com\/reseller-hosting\/\" data-type=\"link\" data-id=\"https:\/\/arzhost.com\/reseller-hosting\/\">Launch Your Own Hosting Business\u2014Sign Up Now!<\/a><span class=\"ez-toc-section-end\"><\/span><\/h2><p class=\"uagb-cta__desc\">Start Reselling Hosting with Confidence &#8211; Economy Plan starts at $12.99\/-<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/arzhost.com\/reseller-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_self\" rel=\"noopener noreferrer\">Read More<\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Troubleshoot_the_Following_Problems\"><\/span><strong>How to Troubleshoot the Following Problems<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"You_Can_Face_an_Error_While_Creating_a_Virtualenv_Common_Issues\"><\/span><strong>You Can Face an Error While Creating a Virtualenv: Common Issues<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>When you are creating a virtualenv with the use of Python3, you can face the following error<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'\n\nOSError: Command \/home\/username\/venv\/bin\/python3 -c \"import sys, pip; sys...d\\\"] + sys.argv&#91;1:]))\" setuptools pip failed with error code 1<\/code><\/pre>\n\n\n\n<p>To avoid this situation, a user has the option to add the following line at the time of installing a custom version in the .bash profile. Hence the user can avoid this error.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export LC_ALL=\"en_US.UTF-8\"<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Using_the_Full_Path_to_Your_Custom_Virtualenv_Ensuring_Proper_Path_Usage\"><\/span><strong>Using the Full Path to Your Custom Virtualenv: Ensuring Proper Path Usage<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>It also happens when you run the command of <a href=\"https:\/\/pypi.org\/project\/virtualenv\/\" target=\"_blank\" rel=\"noopener\">virtualenv<\/a>; it is running in a version outside of your custom installation. You must try the following command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;server]$ which virtualenv\n\n\/home\/user\/opt\/python-3.8.0\/bin\/virtualenv<\/code><\/pre>\n\n\n\n<p>In this way, the user can know the version in the custom python3 directory. Afterward, the user can create a Virtualenv by using the full path as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;server]$ \/home\/user\/opt\/python-3.8.0\/bin\/virtualenv -p \/home\/user\/opt\/python-3.8.0\/bin\/python3 venv<\/code><\/pre>\n\n\n\n<p><strong>Read More:<\/strong><\/p>\n\n\n<ul class=\"wp-block-latest-posts__list wp-block-latest-posts\"><li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/how-to-fix-403-forbidden-error-wordpress\/\">How To Fix 403 Forbidden Error WordPress<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/how-to-get-the-most-out-of-claude-ai\/\">How To Get The Most Out Of Claude Ai<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/bad-gateway-error-502-the-ultimate-guide-to-quick-fixes\/\">Bad Gateway Error (502): The Ultimate Guide to Quick Fixes<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/a-deep-dive-into-todays-best-linux-distros\/\">A Deep Dive Into Today\u2019s Best Linux Distros<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/arzhost.com\/blogs\/domain-investor-terms-powerful-strategy\/\">Domain Investor Terms: Expert Insight on Powerful Strategy<\/a><\/li>\n<\/ul>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Understanding Isolated Python Environments Create Virtual Environment Python 3 application uses modules and packages that are not included in the standard library. These applications often require a specific version of the library. The reason is the app often demands to resolve a particular bug or to write an application in an obsolete version. It is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":7776,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,21,22,25,26,16,15],"tags":[],"table_tags":[],"class_list":["post-2554","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-buisness","category-hosting","category-knowledge","category-server","category-tutorial","category-wordpress"],"_links":{"self":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/2554","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/comments?post=2554"}],"version-history":[{"count":5,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/2554\/revisions"}],"predecessor-version":[{"id":12140,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/2554\/revisions\/12140"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media\/7776"}],"wp:attachment":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media?parent=2554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/categories?post=2554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/tags?post=2554"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/table_tags?post=2554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}