ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied问题解决

 Windows Anaconda python3.6 安装依赖包发生错误如下

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt --user
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: 'D:\\1Atemp\\pip-unpack-dt9854cd\\certifi-2020.6.20-py2.py3-none-any.whl'
Check the permissions.

ps1:此前已在命令后添加--user,依然报错

ps2:此前已用管理员运行anaconda,依然报错

解决方法:修改对应文件夹权限(D:\\1Atemp\\)

step1:找到对应文件夹(D:\\1Atemp\\)右键→属性→安全→高级→更改→在输入对象名称框内填写Administrators→确定→替换子容器和对象的所有者

step2:找到对应文件夹(D:\\1Atemp\\)右键→属性→安全→高级→添加→在输入对象名称框内填写Users→添加“Users”的“完全控制”权限→勾选“使用可从此对象继承的权限替换所有子对象的权限”→确定

成功安装如下

(D:\Anaconda3) D:\Anaconda3>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt --user
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting certifi==2020.6.20
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
     |██████████▌                     | 51 kB 544 kB/s eta 0:00:01     |████████████▌                   | 61 kB 653 kB/s eta 0:00:     |██████████████▌                 | 71 kB 762 kB/s eta 0:0     |█████████████████               | 81 kB 871 kB/s eta 0     |███████████████████             | 92 kB 980 kB/s eta     |█████████████████████           | 102 kB 1.1 MB/s      |███████████████████████         | 112 kB 1.1 MB/     |█████████████████████████       | 122 kB 1.1 M     |███████████████████████████     | 133 kB 1.1     |█████████████████████████████   | 143 kB 1     |███████████████████████████████▌| 153 k     |████████████████████████████████| 156 kB 1.1 MB/s
Requirement already satisfied: wincertstore==0.2 in d:\anaconda3\lib\site-packages (from -r requirements.txt (line 2)) (0.2)
Installing collected packages: certifi
Successfully installed certifi-2020.6.20

具体报错如下

(D:\Anaconda3) D:\Anaconda3>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt --user
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting certifi==2020.6.20
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: 'D:\\1Atemp\\pip-unpack-dt9854cd\\certifi-2020.6.20-py2.py3-none-any.whl'
Check the permissions.

Tr
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值