使用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。