how to use pip in python script code example Example 1: installing pip python -m pip install --upgrade pip Example 2: install pip in python python get-pip.py