pip is the package manager for the Python coding language. It can be installed on a Linux system and then used on the command line to download and install Python packages and their requisite dependencies.
Python is a common language to use for hacking scripts, and on Kali Linux, the biggest use for pip would be to install needed dependencies for Python hacking programs. Whether you are developing your own script or trying to execute a third party Python program, having pip on your system will allow you to install dependency packages very easily.
In this guide, we’ll show you how to install pip for Python 3 on Kali. We’ll also show you basic usage commands for pip, such as installing and removing software packages. pip operates much like Kali’s package manager, which you’re probably already familiar with.
In this tutorial you will learn:
- How to install pip on Kali
- Basic usage commands for pip
|Category||Requirements, Conventions or Software Version Used|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Install pip on Kali
Open a terminal and type the following commands to install pip for Python 3.
$ sudo apt update $ sudo apt install python3-pip
Support for Python 2 is deprecated in the latest Kali releases. You can install the
python-is-python2packages to change the
/usr/bin/pythonsymlink as needed for third party or legacy scripts that rely on one version or the other.
Basic usage commands for pip
You can use the
pip3 command from terminal in order to utilize the pip package manager. Below is a list of pip3 commands to get you started.
To see the version of pip and verify it’s installed on the system:
$ pip3 -V
To install a package:
$ pip3 install package-name
To remove a package:
$ pip3 uninstall package-name
To search for a particular package:
$ pip3 search package-name
To see what packages are installed on your system:
$ pip3 list
To see information about a particular installed package:
$ pip3 show package-name
To access the help menu and see a full list of available pip commands:
$ pip3 help
These are probably all the commands you’ll ever need, but you can check the help menu for a few more, or to get a quick refresher in case you forget one of the commands.
In this guide, we learned how to install pip, the package manager for Python, on all Kali Linux. We also saw how to use pip to install and remove Python packages, as well as retrieving information about those on our system.