How do I install pip on macOS or OS X?
To install pip on macOS or OS X, you need to use the Terminal. Here's how:
Open the Terminal by going to "Applications" > "Utilities" > "Terminal".
Run the following command to install Xcode's command line tools:
xcode-select --install
Watch a video course
Python - The Practical Guide
- Once the command line tools are installed, run the following command to install pip:
python -m ensurepip --upgrade
- You can now use pip to install Python packages. For example, to install the "numpy" package, run the following command:
pip install numpy
That's it! You should now have pip installed on your macOS or OS X machine.