Skip to content

possible errors in WSL when running python3 -m pip #2679

Closed
@nobodhi

Description

In this step:

python3 -m pip install flask

You may encounter an error such as this:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f655471da30>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flask/

When researching this problem you may get led down several rabbit holes, none of which are particularly productive on WSL Ubuntu. (Warning: on WSL do not try editing resolv.conf, that file is a symbolic link and modifying it is a can of worms). Unless you are running an aftermarket firewall, the likely solution is to simply re-install pip:

sudo apt -y purge python3-pip
sudo python3 -m pip uninstall pip
sudo apt -y install python3-pip --fix-missing

H/T - microsoft/WSL#4020


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions