To install pip on macOS, follow these steps:
1. Ensure Python is Installed: macOS typically comes with Python pre-installed. You can check by running:
python3 –version
2. Install pip: If pip is not installed, download and install it using the get-pip.py script. First, download the script:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Then, run the following command to install pip:
python3 get-pip.py
3. Verify Installation: Confirm pip is installed by running:
pip3 –version
Now you can use pip to install Python packages.