Get pip!
As you already know by now, macOS comes with Python pre-installed so there is a very high probability of your machine already possessing the pip
capabilities. Try running the verify pip version command below directly. However, just in case it's not, below is the installation steps.
Installation
In your terminal window, run the following command:
$ get-pip.py
$ sudo python get-pip.py
To verify pip
version/ installation, run the following command:
$ pip --version
Now if you see a version, pip
was successfully installed.
Using pip
pip is a package manager for Python. It is largely used for installing and upgrading Python packages. Here are the basic pip
commands you'll ever need. Run them in your terminal window.
Installing a new Python package:
$ pip3 install <package>
Upgrading an existing Python package:
$ pip3 install --upgrade <package>
See what's already installed:
$ pip3 freeze
Uninstall a package
$ pip3 uninstall <package>
Last updated