Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't use pip on WSL Ubuntu

Tags:

python

pip

flask

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?

like image 466
EnDelt64 Avatar asked Oct 30 '25 12:10

EnDelt64


1 Answers

Tried all solutions, what solved the issue for me is to update the wsl by running from Windows CMD

wsl --update 
like image 112
Roman Prytkov Avatar answered Nov 02 '25 01:11

Roman Prytkov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!