Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

146
Visualizações
pip install failing on python2

Following the instructions on this page to install pip on python2 https://linuxhint.com/installing_pip_linux_mint/

It's failing at the last step, $ sudo python2 get-pip.py

with this error,

Traceback (most recent call last):
  File "get-pip.py", line 24226, in <module>
    main()
  File "get-pip.py", line 199, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    from pip._internal.cli.main import main as pip_entry_point
  File "/tmp/tmp2aZyDl/pip.zip/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

I've tried to look everywhere for a solution, but can't find one. What is it that I'm doing wrong?

over 4 years ago · Hanz Gallego
5 Respostas
Responde à pergunta

0

PIP has dropped support for Python 2.7 in the result you are facing the above issue, so the only thing is to downgrade the version of pip.

only the following command worked for me...

sudo easy_install pip==20.3.4
over 4 years ago · Hanz Gallego Relatório

0

I was getting this error with pip. This command worked for me sudo easy_install pip==20.3.4

over 4 years ago · Hanz Gallego Relatório

0

The correct get-pip.py file for python2 has been moved to https://bootstrap.pypa.io/pip/2.7/get-pip.py

over 4 years ago · Hanz Gallego Relatório

0

Try installing previous version of get-pip

wget https://bootstrap.pypa.io/3.5/get-pip.py

python get-pip.py

over 4 years ago · Hanz Gallego Relatório

0

This is what you need to do

wget https://bootstrap.pypa.io/2.7/get-pip.py
python get-pip.py
over 4 years ago · Hanz Gallego Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda