升级PIP报拒绝访问的错误的解决方法

使用PIP升级命令python -m pip install --upgrade pip,执行后报错

 

报错如下:

Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\program files\\python36\\lib\\site-packages\\pip-18.1.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.

You are using pip version 18.1, however version 21.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

如图:

 

报错是没有权限的问题。 

解决方法:

升级PIP命令改为:python -m pip install --upgrade pip --user

执行后,即可升级PIP。

 

posted @ 2022-05-13 21:37  红番茄先生  阅读(2488)  评论(0编辑  收藏  举报