- ANALITICAS
- Pages
- Installing PIP / PIP3
Installing PIP / PIP3
PIP is a package manager that allows you to manage existing libraries and dependencies and install those you need.
Sometimes, when analysing data with Python, it may be necessary to install additional libraries. In this case, we can use PIP or PIP3.
Modern data analysis relies on Python 3. Therefore you’ll need to install PIP3.
Using the ensurepip module
One way to install PIP / PIP3 is by using the ensurepip module:
Open the terminal on your laptop.
Check if you have the "pip" or "pip3" command installed. You can do this by copying this command and pressing "Enter".
python3 -m ensurepip
If among the command results you read "Requirement already satisfied", you can stop here, this means that pip3 is already installed.
In case pip3 is not already installed, this command will trigger the installation.
Using the get-pip.py file
Another way to install PIP / PIP3 consist of using the get-pip.py file:
Open the terminal and run this command:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Run this command which will proceed to install the previously downloaded package:
python3 get-pip.py
If you want to know the version of PIP3 you have installed, just run this command in the terminal:
pip3 -V
Next steps
Now that you can use PIP or PIP3, you may want to check how to install Jupyter Notebook or JupyterLab. This may be necessary to practice!
Don’t forget to subscribe to the newsletter (if you haven’t already):