python win10 出现 ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问的解决办法
问题环境
python 3.8.6 + Windows 10
问题现象
在使用pip install xxx安装某个包时,报错如下:
ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问
解决办法
第一直觉是因为权限不够引起的,但是使用管理员模式运行cmd,再次运行pip install xxx,命令安装,但是仍然安装失败。
最后解决办法是使用如下命令安装:
python -m pip install xxx
在Python3.8.6和Windows10环境下,使用pip安装包时遇到'ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问'的问题。尝试以管理员权限运行cmd无效。解决方法是通过运行'python -m pip install xxx'来安装所需包,成功规避了权限问题。
9万+

被折叠的 条评论
为什么被折叠?



