[Python配置]执行pip install出现Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。的解决方案

     想对pip进行update。

 

    此时我的pip版本可用pip --version或者pip -V查看。

 一般的解决方案是:

python -m pip install -U pip
python -m pip install --upgrade pip

    如果出现以下问题

 

 

    则是因为响应超时,可以换源update:

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

   如果出现以下问题:Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。

 

   添加--user选项赋予权限:

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

出现Successfully则说明安装成功:

 

posted @ 2020-03-28 22:44  Guardner_Bunny  阅读(56184)  评论(4编辑  收藏  举报