Python提示:Consider using the `--user` option or check the permissions.

Posted 在奋斗的大道

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python提示:Consider using the `--user` option or check the permissions.相关的知识,希望对你有一定的参考价值。

问题描述:今天尝试搭建Python 爬虫框架(Scrapy),首先更新pip 版本管理器版本,执行如下指令:

pip install --upgrade pip

得到如下错误信息:

F:\\python_workspace\\MyScrapy>pip install --upgrade pip
Requirement already satisfied: pip in c:\\python3\\lib\\site-packages (20.3.3)
Collecting pip
  Downloading pip-21.2.4-py3-none-any.whl (1.6 MB)
     |████████████████████████████████| 1.6 MB 819 kB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.3.3
    Uninstalling pip-20.3.3:
      Successfully uninstalled pip-20.3.3
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'C:\\\\Users\\\\zzg\\\\AppData\\\\Local\\\\Temp\\\\pip-uninstall-u4t4npkt\\\\pip.exe'
Consider using the `--user` option or check the permissions.

报错的大致含义:没有执行安装包的权限,可以在指令中添加--user 参数或者检查本地文件夹的相关权限设置。

修改后代码执行:

pip install --user --upgrade pip

执行结果:

F:\\python_workspace\\MyScrapy>pip install --user --upgrade pip
Requirement already satisfied: pip in c:\\python3\\lib\\site-packages (21.2.4)

以上是关于Python提示:Consider using the `--user` option or check the permissions.的主要内容,如果未能解决你的问题,请参考以下文章

Swift 提示:Initialization of variable was never used consider replacing with assignment to _ or removi

warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s in

解决You are using pip version 9.0.1, however version 10.0.1 is available. You should consider upgradin

成功解决You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgra(示

You are using pip version 9.0.1, however version 18.0 is available. You should consider upgrading vi

解决如下问题:You are using pip version 8.1.1, however version 18.0 is available. You should consider upgra