It looks like get-pip.py
has been updated to use the environment variables http_proxy
and https_proxy
.
Windows:
set http_proxy=http://proxy.myproxy.com
set https_proxy=https://proxy.myproxy.com
python get-pip.py
Linux/OS X:
export http_proxy=http://proxy.myproxy.com
export https_proxy=https://proxy.myproxy.com
sudo -E python get-pip.py
However if this still doesn't work for you, you can always install pip through a proxy using setuptools' easy_install
by setting the same environment variables.
Windows:
set http_proxy=http://proxy.myproxy.com
set https_proxy=https://proxy.myproxy.com
easy_install pip
Linux/OS X:
export http_proxy=http://proxy.myproxy.com
export https_proxy=https://proxy.myproxy.com
sudo -E easy_install pip
Then once it's installed, use:
pip install --proxy="user:password@server:port" packagename
From the pip man page:
--proxy
Have pip use a proxy server to access sites. This can be specified
using "user:[email protected]:port" notation. If the password
is left out, pip will ask for it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…