Python | Python 2.7 Install PIP

PIP is not prepackaged with Python 2.7 and I found that PIP is very helpful to install lots of python modules. So thought why not document the steps to install it. So here it is.

Install pip - Straight Forward way 

  1. Download the get-pip.py from https://pip.pypa.io/en/latest/installing.html
  2. Run this on command line - python get-pip.py
If you face any problems like "unable to fetch bla bla..." it is likely that you are having a proxy issue. If so follow the below steps

Install pip with Proxy config

  • Find the proxy config- i.e IP and PORT.
    1. if you already know it, then use that OR
    2. Go to your browser and check the proxy settings ( IE= Tools->Internet Options -> connections Tab -> Lan Settings. chrome= settings-> advanced options -> under Network -> "change proxy settings"). If your setting has "automatic proxy detection" then use the below method to find it.
    3. Open command line and type - "ping wpad" and see you can figure proxy settings. OR
    4. Open command line and type - "Ipconfig /all" and see if you can see the proxy settings OR
    5. from step-4 get the value for "Primary Dns Suffix". Open a browser and type - http://wpad.<Primary Dns Suffix>/wpad.dat. This should the wpad.dat file to you download dir. open the file and you should be able to get the proxy IP address and its port
  • Now on the command line set the environment variables.
    • set http_proxy=<proxy IP>:<Proxy Port>
    • set https_proxy=<proxy IP>:<Proxy Port>
  • Now run this on command line - python get-pip.py

Comments

Popular posts from this blog

Tableau - Accessing Tableau's DB

react-bootstrap-table | header column alignment fix

Tableau : Convert ESRI shapes into Tableau Format