Installing pip with embeddable zip Python in Windows

Embeddable zip

In this post we will see how to install pip with embeddable zip Python in Windows operating system. In my previous tutorial we have seen how to install embeddable zip Python in Windows operating system. We will refer to my previous tutorial as a Python installation prerequisite before we go further down to the details.

Why do you need pip?

Pip is the package installer for Python. By default Python provides core packages for writing Python programs but there are lots of other packages or modules which need to be installed for your applications. Pip is a standard package management tool for installing and managing software packages written in Python.

Prerequisites

Python 3.7.4/3.11.5, Windows 10/11 64 bit

Installing embeddable zip Python

Installing pip

Go through the following steps in order to install pip in Windows operating system.

Make sure you have already installed embeddable zip Python.

  • Go to the link and download the file get-pip.py. Or you may copy the content of the get-pip.py.
  • Put the file get-pip.py in Python root directory C:\python-3.x.x.
  • Start command prompt in administrator mode.
  • Navigate to the Python root directory using command prompt.
  • Execute the below command to install pip
    • python get-pip.py
  • Once installation is successful, you will see similar output as shown in the below image:
pip with embeddable zip Python
  • Next rename C:\python-3.x.x\python3x._pth file to something else, for example, C:\python-3.x.x\python3x._pth.renamed
  • Add pip paths to environment variables
    • Variable name: PY_PIP, Variable value: C:\python-3.x.x\Scripts
    • Variable name: PY_LIBS, Variable value: C:\python-3.x.x\Lib;C:\python-3.x.x\Lib\site-packages

Verifying Installation

Now we will verify whether pip installation was successful or not by installing a module using pip command along with python command.

If we had not added the pip paths to the environment variables or system variables then every time you would need to pass the full path of the pip command whenever you want to install a new module as we had seen similar issues in my previous example.

Installing Module – flask_table

Now we will install a module flask_table that is used for generating HTML table using Flask in Python.

To install the flask_table, execute command pip install flask_table from command window. Make sure you open the command window in administrator mode.

Once the installation is successful, you will see successful message as shown in the below image:

install pip with embeddable zip Python

Therefore we are sure that pip was successfully installed into Windows operating system.

Leave a Reply

Your email address will not be published. Required fields are marked *