[Python] I can't use pip on WSL Ubuntu

Discussão em 'Python' iniciado por Stack, Maio 16, 2025.

  1. Stack

    Stack Membro Participativo

    If I try to download Python packages with pip, following error messages come out.

    nblizz@NBLIZZ-PC:~# pip3 install flask-restful
    Collecting flask-restful
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/flask-restful/
    Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/flask-restful/
    Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/flask-restful/
    Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/flask-restful/
    Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/flask-restful/
    Could not find a version that satisfies the requirement flask-restful (from versions: )
    No matching distribution found for flask-restful


    None of these solutions work.

    • Re-install pip
    • Re-install WSL
    • sudo pip3 install [package]
    • pip3 install [package] with root account
    • sudo -H pip3 install [package]
    • pip install --user [package]

    How do I install pip packages without errors?

    Continue reading...

Compartilhe esta Página