Erro ao instalar o pip

0

Estou tentando reinstalar o PIP, pois estou com problemas para usá-lo por trás de um proxy (como aqui ). Ao tentar usar o método https://bootstrap.pypa.io/get-pip.py , recebi os seguintes erros:

sudo apt-get remove python-pip python3-pip (ok)
wget https://bootstrap.pypa.io/get-pip.py (ok)
sudo python get-pip.py

gera o erro:

The directory '/home/tbrugz/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/tbrugz/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', BadStatusLine("''",))': /simple/pip/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', BadStatusLine("''",))': /simple/pip/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', BadStatusLine("''",))': /simple/pip/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', BadStatusLine("''",))': /simple/pip/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', BadStatusLine("''",))': /simple/pip/
  Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip

Se eu remover o parâmetro sudo ou adicionar --proxy , o erro será o mesmo. Métodos alternativos de instalação são bem-vindos;)

Atualização: esqueci de dizer que estou usando um proxy CNTLM local para se conectar a um proxy externo. Parece que algumas pessoas tiveram um problema semelhante: link

    
por tbrugz 09.01.2017 / 22:24

0 respostas