Upgrade pip timeout python -m pip install --upgrade pip (ultimate solution)

When installing the package today, it shows that pip needs to be upgraded:

But enter the command python -m pip install --upgrade pip provided above, but it times out and the upgrade fails:

Finally, the solution found on the Internet is to set the default time of the timeout and extend it:

python -m pip --default-timeout=800 install --upgrade pip

If it still doesn't work, then use Douban mirror to download, thief fast:

Ultimate solution:

python -m pip install --upgrade pip -i https://pypi.douban.com/simple

Finally solve the problem!

 

Guess you like

Origin blog.csdn.net/qq_35207086/article/details/123595618