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,学习笔记,python,爬虫)