<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chief</title>
    <description>The latest articles on DEV Community by Chief (@njerukariuki).</description>
    <link>https://dev.to/njerukariuki</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F871365%2F1bb5379e-7bc7-4ec6-b27c-4b27dc707b58.jpeg</url>
      <title>DEV Community: Chief</title>
      <link>https://dev.to/njerukariuki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/njerukariuki"/>
    <language>en</language>
    <item>
      <title>Django virtual environment setup in 4 simple steps.</title>
      <dc:creator>Chief</dc:creator>
      <pubDate>Tue, 23 Aug 2022 12:27:16 +0000</pubDate>
      <link>https://dev.to/njerukariuki/django-virtual-environment-setup-in-4-simple-steps-27kk</link>
      <guid>https://dev.to/njerukariuki/django-virtual-environment-setup-in-4-simple-steps-27kk</guid>
      <description>&lt;p&gt;In this post, I will show you how to setup a django virtual environment in 4 simple steps. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why you need to use a virtual environment.
&lt;/h2&gt;

&lt;p&gt;First, let me start by explaining why it is important to setup a development environment for your django projects. The main reason why you need to setup a virtual environment for your django project is because one of your projects is likely to require a different version of an external library than another one. Hence, installing packages in same place means you can't work with different versions of the same library. In short, creating a virtual environment &lt;em&gt;separates the dependencies of different projects by creating a separate isolated environment&lt;/em&gt; for each project.&lt;/p&gt;

&lt;h2&gt;
  
  
  4 steps to setup your django virtual environment.
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create a folder where your project will recide.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;mkdir portfolio&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create virtual environment using python tool -virtualenv-.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;virtualenv portfolioEnv&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Activate your virtual environment.
Depending on where your activate script recides, you may need to use one of the following ways:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;source portfolioEnv/Scripts/activate&lt;/code&gt; &lt;br&gt;
or &lt;br&gt;
&lt;code&gt;source portfolioEnv/bin/activate&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install django in your virtual environment.
&lt;code&gt;pip install django&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it. You have created a virtual environment for your django project. Happy coding :)&lt;/p&gt;

</description>
      <category>django</category>
      <category>webdev</category>
      <category>virtualenvironment</category>
      <category>developmentenvironment</category>
    </item>
  </channel>
</rss>
