<?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: Joseph Kariuki</title>
    <description>The latest articles on DEV Community by Joseph Kariuki (@jkariukidev).</description>
    <link>https://dev.to/jkariukidev</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%2F719775%2Fec951c91-4475-43c9-8fdc-1ac200ff5f00.jpg</url>
      <title>DEV Community: Joseph Kariuki</title>
      <link>https://dev.to/jkariukidev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jkariukidev"/>
    <language>en</language>
    <item>
      <title>VirtualenvWrapper &amp; Python Virtual Environments</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Mon, 06 Jun 2022 11:10:48 +0000</pubDate>
      <link>https://dev.to/jkariukidev/virtualenvwrapper-python-virtual-environments-3fj7</link>
      <guid>https://dev.to/jkariukidev/virtualenvwrapper-python-virtual-environments-3fj7</guid>
      <description>&lt;h2&gt;
  
  
  What is Virtualenvwrapper
&lt;/h2&gt;

&lt;p&gt;It is a library containing extensions that support management of Python virtual environments and the workflow of development using these environments. Virtualenvwrapper enables Python developers manage multiple virtual environments, create, copy and delete these environments among other functionalities illustrated &lt;a href="https://virtualenvwrapper.readthedocs.io/en/latest/index.html#features" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python Virtual Environments
&lt;/h2&gt;

&lt;p&gt;There are many third-party Python libraries that are used by developers to achieve tasks and improve functionality of their software. Third-party libraries are simply code written by someone else rather than you and has probably been published to address a given problem and while developing you may require to leverage the functionality of that library. Also, these libraries are not part of the &lt;a href="https://docs.python.org/3/library/index.html" rel="noopener noreferrer"&gt;Python's Standard Library&lt;/a&gt;. Therefore, anyone who writes more than just a few lines of code or single script will more often than not find themselves making use of one or more of these libraries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Virtualenvwrapper
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbh9ywn4px8jj7ftm975m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbh9ywn4px8jj7ftm975m.jpg" alt="Installing Virtualenvwrapper" width="800" height="425"&gt;&lt;/a&gt;&lt;br&gt;
Virtualenvwrapper can be installed in some few steps that are illustrated in this section. The first step is to ensure that you have Python installed in your machine. If not, refer to these posts:&lt;br&gt;
*&lt;a href="https://dev.to/jkariukidev/installing-python3-in-linux-37da"&gt;Installing Python on Linux&lt;/a&gt;&lt;br&gt;
*&lt;a href="https://dev.to/jkariukidev/installing-python3-in-windows10-4d47"&gt;Installing Python on Windows&lt;/a&gt;&lt;br&gt;
Also, you require to have pip, the Python's package index installed and likewise, if you do not have it, refer to this post:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/jkariukidev/creating-python-virtual-environment-with-pip-2a4p"&gt;Managing Python virtual environments&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Linux
&lt;/h3&gt;

&lt;p&gt;The official documentation recommends that virtualenvwrapper be installed in the same global-site packages as the virtualenv. &lt;br&gt;
Log into your Linux machine and on the terminal install Virtualenvrapper using pip.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install virtualenvwrapper
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To install it for your user only use the following command with --user statement to tell pip to install it for current user only.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install --user virtualenvwrapper
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To confirm successful installation, one can use the &lt;code&gt;whereis&lt;/code&gt; command to search the location of the virtualenvwrapper executable shell script that is usually installed with the library.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;whereis virtualenvwrapper.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which should print out the location of virtualenvwrapper as shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyd5gi9b9seetr1hxlclv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyd5gi9b9seetr1hxlclv.png" alt="Virtualenvrapper location" width="517" height="64"&gt;&lt;/a&gt;&lt;br&gt;
For the local user installation with the additional &lt;code&gt;--user&lt;/code&gt; command, the output will appear as shown below.&lt;/p&gt;

&lt;p&gt;To execute/run virtualenvwrapper, run the shell script that has been shown in the search.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source /usr/local/bin/virtualenvwrapper.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and depending on your installation the following error message may appear.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fprbu8s52ossdb4nf1yv2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fprbu8s52ossdb4nf1yv2.png" alt="error running virtualenvwrapper" width="678" height="173"&gt;&lt;/a&gt;&lt;br&gt;
 which simply complains that it cannot get the value for the VIRTUALENVWRAPPER_PYTHON variable and therefore as a quick fix, we have to set this in the terminal.&lt;br&gt;
Check Python path using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;which python3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and copy the output of the above command as the value as shown below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;hen re-run the &lt;code&gt;source&lt;/code&gt; command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source /usr/local/bin/virtualenvwrapper.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which creates the virtual environment management command scripts as shown below. Note that your path may be different.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyd721qh3t63mpszhqakr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyd721qh3t63mpszhqakr.png" alt="Create Virtualenv" width="681" height="241"&gt;&lt;/a&gt;&lt;br&gt;
The virtualenvwrapper has successfully been set up for use.&lt;/p&gt;
&lt;h3&gt;
  
  
  Windows
&lt;/h3&gt;

&lt;p&gt;There is a different library for virtualenvwrapper called &lt;a href="https://pypi.org/project/virtualenvwrapper-win/" rel="noopener noreferrer"&gt;&lt;strong&gt;virtualenvwrapper-win&lt;/strong&gt;&lt;/a&gt;. Assuming that you already have installed &lt;a href="https://dev.to/jkariukidev/installing-python3-in-windows10-4d47"&gt;Python in Windows&lt;/a&gt;, proceed with opening the Windows terminal or command prompt and install the package using pip.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install virtualenvwrapper-win
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After installing, one can confirm installation using the &lt;code&gt;pip list&lt;/code&gt; command which in this case shows the library/package and its dependencies that have been installed.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzlhgcck6u9gwiu5w589.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzlhgcck6u9gwiu5w589.png" alt="installed Python packages" width="269" height="212"&gt;&lt;/a&gt;&lt;br&gt;
The virtualenvwrapper-win package has been successfully installed.&lt;/p&gt;
&lt;h3&gt;
  
  
  Common virtualenvwrapper commands
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;workon&lt;/strong&gt; - Activate/deactivate and switch between multiple virtual environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mkvirtualenv&lt;/strong&gt; - Create a new virtual environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mktmpenv&lt;/strong&gt; - Create a temporary virtual environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;rmvirtualenv&lt;/strong&gt; - Remove an existing virtual environment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mkproject&lt;/strong&gt; - Project directory management command for creating a new virtual environment in the preset (PROJECT_HOME) directory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;rmproject&lt;/strong&gt; - Remove existing project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;lsvirtualenv&lt;/strong&gt; -  List all the environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;deactivate&lt;/strong&gt; - Deactivate an active virtual environment and switch back to global/system-based Python.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Add Virtualenvwrapper to Startup
&lt;/h3&gt;
&lt;h4&gt;
  
  
  1. Linux
&lt;/h4&gt;

&lt;p&gt;After installing virtualenvwrapper successfully via pip, if you try executing any of the commands directly from the CommandPrompt or Powershell you will get an error.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnhgkt32jmrz1f1h3iig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnhgkt32jmrz1f1h3iig.png" alt="Error Terminal" width="290" height="74"&gt;&lt;/a&gt;&lt;br&gt;
To enable virtualenvwrapper to work on startup, a number a environment variables should be added either to the &lt;code&gt;.bashrc&lt;/code&gt; or &lt;code&gt;.profile&lt;/code&gt; scripts in the home directory of the user. This is because when system is started or rebooted, the OS begins with these.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VIRTUALENVWRAPPER_PYTHON - Overrides the $PATH search by setting the variable to the full path of the Python interpreter to use. In this specific case we'll set it to &lt;code&gt;/usr/bin/python3&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;WORKON_HOME (optional) - This directs virtualenvwrapper on where to place the virtual environments which will be created. If not set it defaults to &lt;code&gt;.local/share/virtualenvs/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;PROJECT_HOME - This directs virtualenvwrapper on where to place the project working directories. Note that this folder must be existing otherwise an error will be thrown.
You can use your preferred editor to append the environment variables to the end of either &lt;code&gt;.bashrc&lt;/code&gt; or &lt;code&gt;.profile&lt;/code&gt; file. This is how the configuration done in .bashrc file appears in vim editor (yours may be different).
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs7arnmtd9xg5iv1krnhv.png" alt="Env Variables" width="456" height="77"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After appending, run the script otherwise you may have to re-log in or reboot to pick up the new variables which can be quite a hassle on time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And any of the virtualenvwrapper commands can now be executed in the terminal. An illustration is shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01ik0ei8unllz9b78fib.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01ik0ei8unllz9b78fib.png" alt="Create Virtualenv" width="800" height="239"&gt;&lt;/a&gt;&lt;br&gt;
Note the brackets on the terminal prompt which indicates that we are in an active Python virtual environment. Now one can proceed with installing packages and developing their software or app.&lt;/p&gt;
&lt;h4&gt;
  
  
  2. Windows
&lt;/h4&gt;

&lt;p&gt;After installing virtualenvwrapper-win successfully via pip, if you try executing any of the commands directly from the CommandPrompt or Powershell you will get an error.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;PowerShell&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frl97sqzvdpfywp3w8fxz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frl97sqzvdpfywp3w8fxz.png" alt="Error Powershell" width="800" height="171"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;CommandPrompt&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frssst8mjzan4zxbskacp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frssst8mjzan4zxbskacp.png" alt="Error CMD" width="569" height="69"&gt;&lt;/a&gt;&lt;br&gt;
Therefore, we should add the Python package scripts folder onto the &lt;a href="https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables" rel="noopener noreferrer"&gt;Windows environment variables&lt;/a&gt; of the current user. The path to the scripts is usually located at &lt;code&gt;C:\Users\&amp;lt;USERNAME&amp;gt;\AppData\Roaming\Python\Python310\Scripts&lt;/code&gt; in the case of Python 3.10. Use the following command to add the location to PATH. Remember to replace 'jkariukidev' below with your user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setx PATH "%PATH%;C:\Users\jkariukidev\AppData\Roaming\Python\Python310\Scripts"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart Command Prompt or PowerShell and try to create a new virtual environment using &lt;code&gt;mkvirtualenv&lt;/code&gt; command as illustrated below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyk7utkiih5orwz4pf5cd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyk7utkiih5orwz4pf5cd.png" alt="Create Virtualenv" width="800" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fipwdt0kvzsmxf5f0ijzw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fipwdt0kvzsmxf5f0ijzw.jpg" alt="Further reading" width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.python.org/3/tutorial/venv.html" rel="noopener noreferrer"&gt;Python Virtual Environments&lt;/a&gt; - Python Documentation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pypi.org/project/virtualenvwrapper/" rel="noopener noreferrer"&gt;Virtualenvwrapper&lt;/a&gt; - Python Package Index / Cheeseshop&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pypi.org/project/virtualenvwrapper-win/" rel="noopener noreferrer"&gt;Virtualenvwrapper-win&lt;/a&gt; - Python Package Index / Cheeseshop&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://help.ubuntu.com/community/EnvironmentVariables" rel="noopener noreferrer"&gt;Linux Environment variables&lt;/a&gt; - Ubuntu Documentation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables" rel="noopener noreferrer"&gt;Windows Environment Variables&lt;/a&gt; - Microsoft Documentation&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Django - A Brief Introduction</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Mon, 25 Apr 2022 07:13:05 +0000</pubDate>
      <link>https://dev.to/jkariukidev/django-a-brief-introduction-11hl</link>
      <guid>https://dev.to/jkariukidev/django-a-brief-introduction-11hl</guid>
      <description>&lt;h2&gt;
  
  
  What is Django?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F247kbpvscy8whia8t0zy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F247kbpvscy8whia8t0zy.png" alt="Image description" width="800" height="278"&gt;&lt;/a&gt;&lt;br&gt;
Django is a robust Python web framework that was named after one Jean Reinhardt, who was a Roman-French jazz, guitarist and music composer and Django was his nickname according to &lt;a href="https://en.wikipedia.org/wiki/Django_Reinhardt" rel="noopener noreferrer"&gt;Wikipedia&lt;/a&gt;.&lt;br&gt;
Most of us know "&lt;a href="https://www.imdb.com/title/tt1853728/" rel="noopener noreferrer"&gt;Django Unchained&lt;/a&gt;" as the Tarantino movie that was released in 2012 and featured Jamie Foxx however, I am here to disappoint you since this post isn't about that. It is about a rich Python web framework that once you dip your fingers in it, you'll highly likely want to dip your hands and feet in it. Let us briefly unbolt Django.&lt;br&gt;
Django can also be referred to as an Model-View-Template (MVT) framework used to build web applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who uses Django
&lt;/h2&gt;

&lt;p&gt;Websites that use Django framework include (but not limited to) the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://disqus.com/" rel="noopener noreferrer"&gt;Disqus&lt;/a&gt;
This is a social website build on top of Django and other frameworks. It supports discussions, comments and audience activity analysis.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.instagram.com/" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;
A social network platform currently owned by Meta (previously FaceBook) that supports media uploading, social account management and handles huge traffic and enormous amounts of data thanks to Django.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.spotify.com/" rel="noopener noreferrer"&gt;Spotify&lt;/a&gt;
Music streaming and sharing platform that enables millions of subscribers around the world to listen, share and purchase music.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://bitbucket.org/" rel="noopener noreferrer"&gt;Bitbucket&lt;/a&gt;
Cloud-based Git repository that hosts millions of code repositories and supports developer communities &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.mozilla.org/" rel="noopener noreferrer"&gt;Mozilla&lt;/a&gt;
The &lt;a href="https://github.com/mozilla/bedrock" rel="noopener noreferrer"&gt;code behind&lt;/a&gt; Mozilla website is based on Django project and serves very many diverse and independent pages with huge amounts of static and media content (images, JavaScript and Cascading Style Sheets).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Other Django powered websites include: &lt;a href="https://www.pinterest.com/" rel="noopener noreferrer"&gt;Pinterest&lt;/a&gt;, &lt;a href="https://www.quora.com/" rel="noopener noreferrer"&gt;Quora&lt;/a&gt;, &lt;a href="https://www.theonion.com/" rel="noopener noreferrer"&gt;The Onion&lt;/a&gt; and &lt;a href="https://www.nasa.gov/" rel="noopener noreferrer"&gt;NASA Website&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Django
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fui33228y2x1sl6z1elra.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fui33228y2x1sl6z1elra.JPG" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
Django framework is simple, yet sophisticated with a "batteries-included" approach which includes out-of-the box for mostly used functionalities such as the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Administrator user interface&lt;/li&gt;
&lt;li&gt;Security and performance&lt;/li&gt;
&lt;li&gt;Multiple database back end support&lt;/li&gt;
&lt;li&gt;User authentication and by extension authorization&lt;/li&gt;
&lt;li&gt;Rich REST API&lt;/li&gt;
&lt;li&gt;Testing suite&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have recently deployed a simple Django website on Heroku that I developed from scratch demonstrating most of the above features. The live site resides at  &lt;a href="http://jkariukidev.herokuapp.com" rel="noopener noreferrer"&gt;http://jkariukidev.herokuapp.com&lt;/a&gt; and the code base is on &lt;a href="https://github.com/jkariukidev/personal-website" rel="noopener noreferrer"&gt;this repository&lt;/a&gt;. I have worked on a documentation to get you going by and it is still being improved.&lt;/p&gt;

&lt;p&gt;There are many web frameworks out here but Django still remains that 'elephant in the room' when it comes to full-stack web development partly because of the rich features mentioned above and because; unlike micro-frameworks such as &lt;a href="https://expressjs.com/" rel="noopener noreferrer"&gt;ExpressJS&lt;/a&gt; and &lt;a href="https://flask.palletsprojects.com/" rel="noopener noreferrer"&gt;Flask&lt;/a&gt; which yield more flexibility, Django surrenders flexibility and reduces opportunities for mistakes (and time spent in debugging the bugs associated with the mistakes) encountered in writing functionality code from scratch. &lt;/p&gt;

&lt;p&gt;Django uses a &lt;a href="https://docs.djangoproject.com/en/4.0/misc/design-philosophies/#don-t-repeat-yourself-dry" rel="noopener noreferrer"&gt;Don't Repeat Yourself (DRY)&lt;/a&gt; principle which reduces code duplication.&lt;/p&gt;

&lt;p&gt;Django includes a powerful &lt;a href="https://en.wikipedia.org/wiki/Object-relational_mapping" rel="noopener noreferrer"&gt;Object Relational Mapper (ORM)&lt;/a&gt; layer by default that can be used to interact with various databases such as MySQL, SQLite, PostgreSQL and Oracle without having to rewrite the SQL dialect (language) code for each database back end since each database has its own dialect.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Blues of Django
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhowdpifkxc03wnhxv3wb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhowdpifkxc03wnhxv3wb.jpg" alt="Image description" width="800" height="548"&gt;&lt;/a&gt;&lt;br&gt;
While Django is all good as a framework, there are some cons that come with it just like any other framework.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Django can be a bloated framework for small projects. It may not be the best approach for small projects like one page websites and the like. Preferable for projects such as blogs, social websites and e-commerce sites.&lt;/li&gt;
&lt;li&gt;Monolithic architecture that limits developer's freedom in introducing new implementations outside Django. A workaround to this would include adding third-party packages into a Django project.&lt;/li&gt;
&lt;li&gt;Full knowledge of the framework may be required to kick-start on projects and may take time to learn the whole framework.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;Interested in learning Django? Here are some reference links to posts and some reads on the ever growing web development framework.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.djangoproject.com" rel="noopener noreferrer"&gt;Django official documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://learndjango.com" rel="noopener noreferrer"&gt;Learn Django&lt;/a&gt; By William Vincent&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django" rel="noopener noreferrer"&gt;MDN Django Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tutorial.djangogirls.org/" rel="noopener noreferrer"&gt;Django Girls&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Reading GeoNode Data using QGIS</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Wed, 20 Apr 2022 05:44:19 +0000</pubDate>
      <link>https://dev.to/jkariukidev/reading-geonode-data-using-qgis-5695</link>
      <guid>https://dev.to/jkariukidev/reading-geonode-data-using-qgis-5695</guid>
      <description>&lt;p&gt;GeoNode data can be accessed using QGIS Desktop via the Open Geospatial Consortium (OGC) Web Services and GeoServer REST service. Here is a demonstration on the interoperability between GeoNode and QGIS as open source GIS softwares.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/QqNZVDByyWo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>django</category>
      <category>geospatial</category>
    </item>
    <item>
      <title>Installing Python3 in Linux</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Tue, 29 Mar 2022 05:19:00 +0000</pubDate>
      <link>https://dev.to/jkariukidev/installing-python3-in-linux-37da</link>
      <guid>https://dev.to/jkariukidev/installing-python3-in-linux-37da</guid>
      <description>&lt;h4&gt;
  
  
  Introduction
&lt;/h4&gt;

&lt;p&gt;Python3 has over the years increased in popularity among the developer communities worldwide and still is at the top according to &lt;a href="https://bootcamp.berkeley.edu/blog/most-in-demand-programming-languages/" rel="noopener noreferrer"&gt;this statistic&lt;/a&gt;. The language was authored by a Dutch programmer called &lt;a href="https://gvanrossum.github.io/" rel="noopener noreferrer"&gt;Guido van Rossum&lt;/a&gt;. &lt;br&gt;
Linux is an operating system like Windows and Mac-OS and one of the most popular platforms that power most cloud solutions and in fact, Android is also Linux under the hood. That said, we are going to see how one can get started with Python on Linux by installing it. This article assumes that the reader has some understanding in using Linux. &lt;/p&gt;
&lt;h4&gt;
  
  
  Why Python3?
&lt;/h4&gt;

&lt;p&gt;Python is a high-level, open-source and dynamic programming language. It is generally easy to learn and code as compared to its other counterparts. Some of its features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Object-orientation&lt;/strong&gt;: Python supports Object-Oriented programming concepts such as use of objects, classes, object encapsulation etc. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High-level language&lt;/strong&gt;: unlike in low-level languages where one has to manage memory and remember the system architecture, in Python this is not necessary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interpreted language&lt;/strong&gt;: Execution of Python's code is line-by-line at a time unlike in other programming languages like &lt;em&gt;C++, Java&lt;/em&gt; and &lt;em&gt;C&lt;/em&gt;. Python is easier to debug since there is no need for compilation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamically typed&lt;/strong&gt;: The value of a variable is decided at run time rather than previous as it is with the case in statically typed languages like Java where one has to define a type (e.g. int, long, string).
The above are just but a few mentions of the cool features of Python. Others include free and open source, high portability, can be integrated and interoperable with other languages e.g. &lt;em&gt;C, Java&lt;/em&gt; and &lt;em&gt;C#&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  Uses of Python
&lt;/h5&gt;

&lt;p&gt;Python is generally used in the areas of game development, data engineering, Artificial Intelligence, Machine Learning, graphical user interface (GUI) development and web development. &lt;/p&gt;
&lt;h6&gt;
  
  
  Game Development
&lt;/h6&gt;

&lt;p&gt;Python can be employed in developing games and it can also act as a means of learning how to code with Python or deepening one's knowledge in the language. The libraries that can be leveraged for this include: &lt;a href="https://pypi.org/project/arcade/" rel="noopener noreferrer"&gt;arcade&lt;/a&gt;, &lt;a href="https://pypi.org/project/pygame/" rel="noopener noreferrer"&gt;pygame&lt;/a&gt;, &lt;a href="https://pypi.org/project/Panda3D/" rel="noopener noreferrer"&gt;Panda3D&lt;/a&gt;, &lt;a href="https://pypi.org/project/cocos2d/" rel="noopener noreferrer"&gt;cocos2D&lt;/a&gt;, &lt;a href="https://pypi.org/project/pyglet/" rel="noopener noreferrer"&gt;pyglet&lt;/a&gt;, &lt;a href="https://wiki.ogre3d.org/Python-Ogre" rel="noopener noreferrer"&gt;Python-ogre&lt;/a&gt;&lt;/p&gt;
&lt;h6&gt;
  
  
  Data Engineering
&lt;/h6&gt;

&lt;p&gt;This entails data management methods such as data mining, modelling, crunching and metadata management ad different scales (from small data to big data). Python is primarily employed for data analysis and pipelines. Python libraries used here include:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pandas.pydata.org/" rel="noopener noreferrer"&gt;Pandas&lt;/a&gt;, &lt;a href="https://www.scipy.org/" rel="noopener noreferrer"&gt;SciPy&lt;/a&gt;, &lt;a href="https://pypi.org/project/beautifulsoup4/" rel="noopener noreferrer"&gt;Beautiful Soup&lt;/a&gt;&lt;/p&gt;
&lt;h6&gt;
  
  
  Artificial Intelligence / Machine Learning
&lt;/h6&gt;

&lt;p&gt;According to &lt;a href="https://www.ibm.com/cloud/learn/what-is-artificial-intelligence" rel="noopener noreferrer"&gt;IBM&lt;/a&gt;, Artificial Intelligence (AI) is technology that instructs computers to mimic the human mind in decision-making and problem-solving. Machine Learning (ML) is a subset of AI that consist of procedures that leverage on mathematical data models and algorithms to make predictions. Python implements ML and AI with generally fewer lines of code and pre-built libraries and being a scientific language also comes in support of these technologies. Some of the libraries used in AI and ML include:&lt;br&gt;
&lt;a href="https://pypi.org/project/tensorflow/" rel="noopener noreferrer"&gt;Tensorflow&lt;/a&gt;, &lt;a href="https://scikit-learn.org/stable/index.html" rel="noopener noreferrer"&gt;Scikit-Learn&lt;/a&gt;, &lt;a href="https://numpy.org/" rel="noopener noreferrer"&gt;Numpy&lt;/a&gt;, &lt;a href="https://keras.io/" rel="noopener noreferrer"&gt;Keras&lt;/a&gt;, &lt;a href="https://pypi.org/project/Theano/" rel="noopener noreferrer"&gt;Theano&lt;/a&gt; &lt;/p&gt;
&lt;h6&gt;
  
  
  GUI Development
&lt;/h6&gt;

&lt;p&gt;Python contains a variety of Graphical User Interface (GUI) frameworks that are being used by developers to create interactive windows and widget controls. The libraries include:&lt;br&gt;
&lt;a href="https://pypi.org/project/PyQt5/" rel="noopener noreferrer"&gt;PyQt&lt;/a&gt;, &lt;a href="https://kivy.org/" rel="noopener noreferrer"&gt;Kivy&lt;/a&gt;, &lt;a href="https://docs.python.org/3/library/tkinter.html#module-tkinter" rel="noopener noreferrer"&gt;Tkinter&lt;/a&gt; and &lt;a href="https://pypi.org/project/wxPython/" rel="noopener noreferrer"&gt;wxPython&lt;/a&gt;.&lt;br&gt;
For a sneak peek on GUI development with PyQt, please refer to my GitHub repository on &lt;a href="https://github.com/jkariukidev/PyQt-Project" rel="noopener noreferrer"&gt;PyQt Interfaces&lt;/a&gt; and &lt;a href="https://github.com/jkariukidev/simple_to-do_list" rel="noopener noreferrer"&gt;Desktop To-do list&lt;/a&gt;.&lt;/p&gt;
&lt;h6&gt;
  
  
  Web Development
&lt;/h6&gt;

&lt;p&gt;Building, constructing, and maintaining websites is a broad definition of web development. A front-end, which communicates with the client, and a back-end, which contains business logic and interacts with a database, are typical components of web development. Python also supports quite a percentage of the total websites, web apps and software running in the world wide web. The libraries that are applied in web development include: &lt;a href="https://www.djangoproject.com/" rel="noopener noreferrer"&gt;Django&lt;/a&gt;, &lt;a href="https://flask.palletsprojects.com/en/2.0.x/" rel="noopener noreferrer"&gt;Flask&lt;/a&gt;, &lt;a href="https://trypyramid.com/" rel="noopener noreferrer"&gt;Pyramid&lt;/a&gt; and &lt;a href="https://turbogears.org/" rel="noopener noreferrer"&gt;Turbogears&lt;/a&gt; and &lt;a href="https://pypi.org/project/web2py/" rel="noopener noreferrer"&gt;Web2Py&lt;/a&gt; &lt;/p&gt;
&lt;h4&gt;
  
  
  Methods of Installing Python3
&lt;/h4&gt;

&lt;p&gt;Enough of the libraries, features and usage of Python. Let us see how we can successfully install Python3 in Linux. In this article, we are using Ubuntu 20.04 Long Term Release (LTS) distribution of Linux. I have compiled three different approaches that include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using deadsnakes PPA&lt;/li&gt;
&lt;li&gt;Building from source&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  Installing via Apt and deadsnakes PPA
&lt;/h5&gt;

&lt;p&gt;Most factory versions of Ubuntu ship with Python already installed. To confirm if Python is already installed in your OS, enter the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If python is not installed, the following output will be shown.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctnv4vjj4eh9hfrhn3o2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctnv4vjj4eh9hfrhn3o2.png" alt="Python not installed" width="281" height="55"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The recommended Python is &lt;strong&gt;3.7.x&lt;/strong&gt; and above therefore if lower than the version or not installed, continue to the next step. Let us first update and upgrade the repository lists via the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then install the &lt;strong&gt;software-properties-common&lt;/strong&gt; package whose work is to allow one to easily manage distributions and independent software vendor software sources.&lt;br&gt;
The next step is to add the &lt;a href="https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa" rel="noopener noreferrer"&gt;deadsnakes PPA&lt;/a&gt; with the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;add-apt-repository ppa:deadsnakes/ppa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which shows the following prompt to press enter.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faig6t3rr01sfqr7uqyvk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faig6t3rr01sfqr7uqyvk.png" alt="Deadsnakes PPA" width="717" height="101"&gt;&lt;/a&gt;&lt;br&gt;
Press enter to proceed and once it is through you should refresh the package list once again via&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then install Python 3.10 (latest as of the time of this publication) via the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt install -y python3.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Assuming successful installation of Python 3.10, check the specific version via:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3.10 --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which shows the specific version.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs6oasnge71xs6grs6qv5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs6oasnge71xs6grs6qv5.png" alt="Python version" width="212" height="55"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;
  
  
  Building Python from Source
&lt;/h5&gt;

&lt;p&gt;Packages and software can be installed by compiling from downloaded binary scripts and Python is no different. We shall begin by installing the prerequisites required for compiling and building Python which include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installing required packages&lt;/li&gt;
&lt;li&gt;Building Python from source&lt;/li&gt;
&lt;li&gt;Installing Python&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  Installing required packages
&lt;/h5&gt;

&lt;p&gt;To install the pre-requisites, enter the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt install -y build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Build Python
&lt;/h5&gt;

&lt;p&gt;To build Python, the first step should be to download the Python version of your choice (3.10.04 used here). I am making use of the &lt;strong&gt;wget&lt;/strong&gt; utility package to download from Python website.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tar.xz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Extract the downloaded Python archive when download is complete. One can add the v option for verbose logs when extracting e.g.add &lt;code&gt;-xvf&lt;/code&gt; in place of &lt;code&gt;-xf&lt;/code&gt; below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tar -xf Python-3.10.4.tar.xz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Navigate into the Python directory and configure and ensure &lt;a href="https://github.com/docker-library/python/issues/160" rel="noopener noreferrer"&gt;enable-optimization&lt;/a&gt; option is added as shown in the command below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd Python-3.10.4
./configure --enable-optimizations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Install Python
&lt;/h5&gt;

&lt;p&gt;To install Python without overwriting the default version that is already installed in Ubuntu, use the following command. Note, if you use &lt;code&gt;make install&lt;/code&gt; it shall overwrite the default Python and may cause some issues ahead.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;make altinstall
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To test Python installation, use the same command as in the previous steps.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3.10 --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;We have been able to install the latest Python in Ubuntu 20.04 using various methods. To install Python on Windows, please refer to my previous post &lt;a href="https://dev.to/jkariukidev/installing-python3-in-windows10-4d47"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;HAPPY CODING!!!&lt;/p&gt;

</description>
      <category>python</category>
      <category>linux</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>GeoNode Basic Installation on Windows</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Wed, 23 Mar 2022 02:17:51 +0000</pubDate>
      <link>https://dev.to/jkariukidev/geonode-basic-installation-on-windows-382p</link>
      <guid>https://dev.to/jkariukidev/geonode-basic-installation-on-windows-382p</guid>
      <description>&lt;p&gt;Harness the capabilities of Geospatial Information, DevOps and Windows Subsystem for Linux in deploying GeoNode Spatial Data Infrastructure in Windows in just a few steps illustrated below.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/lDsDNh6kujw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>devops</category>
      <category>python</category>
      <category>django</category>
    </item>
    <item>
      <title>GeoNode Basic Installation using Docker</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Wed, 16 Mar 2022 02:30:53 +0000</pubDate>
      <link>https://dev.to/jkariukidev/geonode-basic-installation-using-docker-5bgd</link>
      <guid>https://dev.to/jkariukidev/geonode-basic-installation-using-docker-5bgd</guid>
      <description>&lt;p&gt;GeoNode is an open-source spatial data infrastructure (SDI) that is open source and used to store and manage geospatial data including sharing it over the web.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker&lt;/strong&gt; came to revolutionize the DevOps practices and here is one example of such. Let us deploy GeoNode in Ubuntu 20.04 using docker.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/O4xZ5_unX5g"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>python</category>
      <category>django</category>
      <category>linux</category>
      <category>opensource</category>
    </item>
    <item>
      <title>GeoNode Advanced Installation In Ubuntu 20.04 Part3</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Wed, 09 Mar 2022 02:19:12 +0000</pubDate>
      <link>https://dev.to/jkariukidev/geonode-advanced-installation-in-ubuntu-2004-part3-20fd</link>
      <guid>https://dev.to/jkariukidev/geonode-advanced-installation-in-ubuntu-2004-part3-20fd</guid>
      <description>&lt;p&gt;This is a continuation of the second steps in practical installation of GeoNode in Ubuntu 20.04 using advanced method.&lt;/p&gt;

&lt;p&gt;GeoNode is an open-source spatial data infrastructure (SDI) that is open source and used to store and manage geospatial data including sharing it over the web. &lt;br&gt;
In this tutorial we install and configure PostgreSQL/PostGIS and GeoServer components of GeoNode. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/qNDluF7pqXU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>python</category>
      <category>django</category>
      <category>linux</category>
      <category>opensource</category>
    </item>
    <item>
      <title>GeoNode Advanced Installation In Ubuntu 20.04 Part2</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Sat, 05 Mar 2022 01:42:09 +0000</pubDate>
      <link>https://dev.to/jkariukidev/geonode-advanced-installation-part2-3km2</link>
      <guid>https://dev.to/jkariukidev/geonode-advanced-installation-part2-3km2</guid>
      <description>&lt;p&gt;This is a continuation of the First steps in practical installation of GeoNode in Ubuntu 20.04 using advanced method.&lt;/p&gt;

&lt;p&gt;GeoNode is an open-source spatial data infrastructure (SDI) that is open source and used to store and manage geospatial data including sharing it over the web. &lt;br&gt;
In this tutorial we install and configure PostgreSQL/PostGIS and GeoServer components of GeoNode. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/OrIvKQJFyJk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>postgres</category>
      <category>tomcat</category>
      <category>opensource</category>
    </item>
    <item>
      <title>GeoNode Advanced Installation in Ubuntu 20.04 Part 1</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Fri, 25 Feb 2022 02:37:17 +0000</pubDate>
      <link>https://dev.to/jkariukidev/geonode-advanced-installation-in-ubuntu-2004-part-1-3p6i</link>
      <guid>https://dev.to/jkariukidev/geonode-advanced-installation-in-ubuntu-2004-part-1-3p6i</guid>
      <description>&lt;p&gt;This is the First steps of the installation of GeoNode in Ubuntu 20.04 using advanced method.&lt;/p&gt;

&lt;p&gt;GeoNode is an open-source spatial data infrastructure (SDI) that is open source and used to store and manage geospatial data including sharing it over the web. &lt;/p&gt;

&lt;p&gt;In this tutorial we install and configure the pre-requisites of GeoNode. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Womv095voPQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>django</category>
      <category>linux</category>
      <category>gis</category>
    </item>
    <item>
      <title>Creating Python Virtual Environment with Pip</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Sat, 20 Nov 2021 10:33:54 +0000</pubDate>
      <link>https://dev.to/jkariukidev/creating-python-virtual-environment-with-pip-2a4p</link>
      <guid>https://dev.to/jkariukidev/creating-python-virtual-environment-with-pip-2a4p</guid>
      <description>&lt;p&gt;There are two known Python versions;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Python2 that got deprecated in the beginning of 2020.&lt;/li&gt;
&lt;li&gt;Python3 that is being used currently in many projects.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A requirement is that when installing Python in Windows, ensure that you have checked the "Add to PATH" checkbox otherwise Python and pip commands will not be executed in the Command Prompt.&lt;br&gt;
For instructions on installing Python in Windows, refer to my post &lt;a href="https://dev.to/jkariukidev/installing-python3-in-windows10-4d47"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Python Virtual Environment
&lt;/h3&gt;

&lt;p&gt;By default, Python installs modules or packages system wide which can become an issue if he program(s) in use or being developed or tested require different versions of the same module.  A Python virtual environment is comes into use for the above mentioned challenge and can be defined as a self-contained directory tree that hosts a Python installation and some given packages. For more on definition of it refer to &lt;a href="https://docs.python.org/3/tutorial/venv.html#introduction" rel="noopener noreferrer"&gt;Python documentation&lt;/a&gt; &lt;/p&gt;
&lt;h3&gt;
  
  
  Pip
&lt;/h3&gt;

&lt;p&gt;Python versions 2.7.9 / 3.4 and above have pip shipped in their installers therefore one doesn't have to install pip separately. However for earlier versions, reference can be made to the following &lt;a href="http://pip-installer.org" rel="noopener noreferrer"&gt;link&lt;/a&gt;&lt;br&gt;
Pip is a package management system for Python that can also be used to install various software written in Python / modules and their respective dependencies.&lt;/p&gt;
&lt;h4&gt;
  
  
  Install pip in Windows
&lt;/h4&gt;

&lt;p&gt;To install pip in Windows, ensure that you click on  'Customize installation' option shown below and then check the checkbox labelled 'install pip'.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6imwp20td4scywp9rzk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6imwp20td4scywp9rzk0.png" alt="Image description" width="661" height="405"&gt;&lt;/a&gt;&lt;br&gt;
check the checkbox labelled 'pip' as shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61ua8p2dweux2qsyvca8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61ua8p2dweux2qsyvca8.png" alt="Image description" width="660" height="401"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Check pip
&lt;/h3&gt;

&lt;p&gt;It is always good practice to ensure that pip is installed and working as it should before taking the next steps. To check pip installation in Windows, open Command Prompt (CMD) or Windows Terminal and type the following command and note that the letter 'V' is in upper case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip -V
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which should output the version and path to the location of it as shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa0wkcp1yfx0s094tepaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa0wkcp1yfx0s094tepaz.png" alt="Image description" width="800" height="69"&gt;&lt;/a&gt;&lt;br&gt;
After confirming the installation, the next step will be to install virtual environment package.&lt;/p&gt;
&lt;h3&gt;
  
  
  Installing &lt;em&gt;virtualenv&lt;/em&gt; package
&lt;/h3&gt;

&lt;p&gt;We can now use pip to install virtualenv package and for this we shall install it system-wide using the following command that one can paste inside CMD/terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m pip install virtualenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ensure the PC is connected to the internet so as to download the packages and their dependencies. The installation appears as shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tnzwrv6z2shzesydaz0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tnzwrv6z2shzesydaz0.png" alt="Image description" width="800" height="236"&gt;&lt;/a&gt;&lt;br&gt;
If you get the warning (shown in amber) that indicates you need to upgrade pip, then run the following command to upgrade pip to the latest version.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m pip install --upgrade pip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The upgrade process in the command window appears as shown below. The pip version has been upgraded from version 21.2.3 to 21.3.1.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcftgweqvcypqrwy9k4ad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcftgweqvcypqrwy9k4ad.png" alt="Image description" width="765" height="266"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Creating Virtual Environment
&lt;/h3&gt;

&lt;p&gt;Let us create a virtual environment by running the following command in the CMD.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m virtualenv my_env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above command creates a new python virtual environment named &lt;em&gt;my_env&lt;/em&gt; in the current directory. The creation process appears as shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7s4hz1g7l6ixwhhfsozv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7s4hz1g7l6ixwhhfsozv.png" alt="Image description" width="793" height="149"&gt;&lt;/a&gt;&lt;br&gt;
The folder that has been created appears as shown below. We won't go into the details of the folder otherwise if interested, refer to the Python pip documentation.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydt9pgea1d7iwj1418rg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydt9pgea1d7iwj1418rg.png" alt="Image description" width="294" height="150"&gt;&lt;/a&gt;&lt;br&gt;
The next step will be to activate the just created virtual environment.&lt;/p&gt;
&lt;h3&gt;
  
  
  Activating the Virtual Environment
&lt;/h3&gt;

&lt;p&gt;To use the virtual environment, it has to be activated otherwise if not, one will be using the system-wide pip which is not recommended and may lead to dependency issues. To activate the virtual environment run the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my_env\Scripts\activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which enters into an active environment denoted by the name in the parentheses as shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdjufk24uwkjvaa6feigs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdjufk24uwkjvaa6feigs.png" alt="Image description" width="532" height="74"&gt;&lt;/a&gt;&lt;br&gt;
To test the environment run the previously run command for checking the pip version, &lt;em&gt;pip -V&lt;/em&gt; command which will show the version and location of pip shown below. Note the location is different from the pip that is system-wide.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnlyyp6wam4znmxt8edmo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnlyyp6wam4znmxt8edmo.png" alt="Image description" width="800" height="58"&gt;&lt;/a&gt;&lt;br&gt;
To check on the installed packages run the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which will show all the packages that are installed and these are the default packages.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faseezdn7rqn2rugdgwyd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faseezdn7rqn2rugdgwyd.png" alt="Image description" width="464" height="148"&gt;&lt;/a&gt;&lt;br&gt;
To show the details of a package for instance, pip package which exists in the current virtual environment, type the following command in the command line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip show pip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which displays some information about the package as shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk4wfpgde8xjp47krwwt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk4wfpgde8xjp47krwwt.png" alt="Image description" width="729" height="268"&gt;&lt;/a&gt;&lt;br&gt;
The last command will be for checking outdated packages which can be done by running the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip list -o 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which shows the package name, current and latest version.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Pip and virtualenv can be used to create and manage isolated environments and python projects alike and are actually being utilized a lot. Therefore it would be of great importance to learn about them by referring to the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://pip.pypa.io/en/stable/" rel="noopener noreferrer"&gt;Pip documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.python.org/3/tutorial/venv.html" rel="noopener noreferrer"&gt;Python Virtual Environments and Packages&lt;/a&gt; 
To close, one has to deactivate the environment by running the following command.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deactivate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and this will return to the usual commandline without the environment name inside the parentheses.&lt;br&gt;
Keep posted for future posts on virtual environments and subscribe to my posts as well.&lt;/p&gt;

</description>
      <category>python</category>
      <category>virtualenv</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Installing Python3 in Windows10</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Sat, 09 Oct 2021 15:37:53 +0000</pubDate>
      <link>https://dev.to/jkariukidev/installing-python3-in-windows10-4d47</link>
      <guid>https://dev.to/jkariukidev/installing-python3-in-windows10-4d47</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;This post is a walkthrough for those who want to begin coding in Python and probably do not know how to install the software in order to get started on coding with it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step1: Downloading Python
&lt;/h3&gt;

&lt;p&gt;Navigate to the official Python download page in your preferred browser &lt;a href="https://www.python.org/downloads/" rel="noopener noreferrer"&gt;here&lt;/a&gt; and it may look similar to the one shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxksumqfrsw9kddmzihqd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxksumqfrsw9kddmzihqd.png" alt="Python download page" width="800" height="624"&gt;&lt;/a&gt;&lt;br&gt;
Click on the download button to download the latest version of Python (Python 3.10 in this post) otherwise you can scroll down to check other specific versions that you prefer. The download process should start and give it some moments to complete.&lt;br&gt;
Once the download is complete, the installer file should appear as shown below. Ensure to download Python that corresponds to your machine whether it is 32-bit or 64-bit and for details on that refer &lt;a href="https://support.microsoft.com/en-us/windows/32-bit-and-64-bit-windows-frequently-asked-questions-c6ca9541-8dce-4d48-0415-94a3faa2e13d" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73scce203hhvocbg0u7x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73scce203hhvocbg0u7x.png" alt="Python installer file" width="623" height="93"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step2: Installing Python
&lt;/h3&gt;

&lt;p&gt;Double click the installer to run and at this point ensure that the logged in user has administrative rights (running and installing Python may require this). The setup wizard should appear as shown below. Ensure the 'Add to PATH' checkbox is checked as shown in the screenshot below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0l234q3rxmyw7ygt7pig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0l234q3rxmyw7ygt7pig.png" alt="Python installation wizard" width="662" height="408"&gt;&lt;/a&gt;&lt;br&gt;
Click 'Install Now' to proceed with the installation process which shall be indicated with a green progress bar as shown below. Give it some moments to complete installing.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8wttfg9youbgfwvxxk4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8wttfg9youbgfwvxxk4z.png" alt="Python install progress" width="662" height="404"&gt;&lt;/a&gt;&lt;br&gt;
Once the installation is complete, an installation success wizard page appears as shown below otherwise if there is an installation error a different message will appear.&lt;/p&gt;

&lt;p&gt;To close the installation wizard, click Close button. To confirm that Python has been installed to Windows PATH, open the Windows Command Prompt (CMD) by clicking on the Start button and typing 'cmd' text as shown below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foz0lokzp5kl8v9qonjv9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foz0lokzp5kl8v9qonjv9.png" alt="Windows Command Prompt" width="787" height="677"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step3: Running Python
&lt;/h3&gt;

&lt;p&gt;Click on the 'Command Prompt' option and a black window should show up as below which is the Windows Command Prompt that is similar to the &lt;a href="https://www.linuxbabe.com/command-line/linux-terminal" rel="noopener noreferrer"&gt;Linux Terminal&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd422uk0mm3gspav4h04v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd422uk0mm3gspav4h04v.png" alt="Windows Command Prompt" width="800" height="418"&gt;&lt;/a&gt;&lt;br&gt;
Type 'python' in the Command Prompt and click Enter key on the keyboard and the Python shell should appear as shown below indicating that Python has been installed and added to Windows PATH.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frutbf6fxxn6phgvi7sr8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frutbf6fxxn6phgvi7sr8.png" alt="Python shell" width="783" height="88"&gt;&lt;/a&gt;&lt;br&gt;
To exit the Python shell, type 'exit' command and click Enter key on the keyboard. Now, Python has been installed successfully in Windows.&lt;/p&gt;

&lt;p&gt;HAPPY CODING!!!&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Firing up that coding journey</title>
      <dc:creator>Joseph Kariuki</dc:creator>
      <pubDate>Sat, 09 Oct 2021 14:44:04 +0000</pubDate>
      <link>https://dev.to/jkariukidev/firing-up-that-coding-journey-h4i</link>
      <guid>https://dev.to/jkariukidev/firing-up-that-coding-journey-h4i</guid>
      <description>&lt;p&gt;Have you found yourself interested in programming or are you in another field or career and have been considering to switch into coding?&lt;br&gt;
Well, I had a similar experience some years ago (2016) and while at it made a decision to embrace coding which wasn't a big part of my job then.&lt;br&gt;
I used to write some short code snippets in Python and JavaScript and play around with HTML and CSS (they are not programming languages but equally important in my view). Browsing through the internet and checking out the projects that other people were doing inspired me to start the coding journey.&lt;br&gt;
I started by doing some HTML, CSS and JavaScript tutorials on &lt;a href="https://www.codecademy.com/" rel="noopener noreferrer"&gt;https://www.codecademy.com/&lt;/a&gt; where I learned some cool basic stuff on the subjects.&lt;br&gt;
I then embarked on FreeCodeCamp which one can visit at &lt;a href="https://www.freecodecamp.org/" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/&lt;/a&gt; where I also proceeded to learn on HTML, CSS and JavaScript. &lt;br&gt;
For beginners and newbies, I would highly recommend the platforms and you are not limited to them since currently there are many others including YouTube channels.&lt;br&gt;
Well, happy coding and keep sharing your progresses and project paths.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>codenewbie</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
