You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command解决方法

pip install requests

运行时报错:

You should consider upgrading via the 'python -m pip install --upgrade pip' command

如下图:

You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command解决方法_第1张图片

 

表示pip版本不适配,可以用以下代码查看,会告诉你当前版本和期望版本

pip show pip

You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command解决方法_第2张图片

执行python -m pip install --upgrade pip 超时,这是因为pip源在国外,所以连起来比较慢,可以改用国内的源

可以用

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

同理,安装其他包也可以使用,如

You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command解决方法_第3张图片

转自:You should consider upgrading via the 'python -m pip install --upgrade pip' command解决方法

你可能感兴趣的:(Linux,python,pip)