Installing pip

The steps for installing pip are as follows:

  1. To install pip, you need to download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py, and make a note of the path where the file is located. In my case, the file is located at Documents\ai\softwares.
  2. Open the Command Prompt and go to the Documents\ai\softwares folder by using the cd command, as shown in the following screenshot:

Figure 9
  1. Use the dir command to take a look at the contents of this folder, where you will see get-pip.py, shown in the following screenshot:

Figure 10
  1.  Next, we'll run the python get-pip.py command. 
  2. Now, let's add Python's scripts folder to the Path environment variable.
  3. Open another Command Prompt window and test the installation of pip by typing the pip --version command. Upon successful installation, you will get the following output:

Figure 11
  1. Once pip has installed, you can install pydot by running the following command:
pip install pydot 
  1. Finally, install matplotlib by executing the following command:
pip install matplotlib  
  1. We can check whether the libraries have been installed properly by using the import command in Python's interpreter, as shown in the following screenshot:

Figure 12

Now, we're done installing the libraries that we will need in Windows for this book . In the next topic, we will look at how we can go about developing a file search application.