ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied

简介: ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied

报错


20210620210156275.png


解决方案


根据提示在指令后添加--user即可

20210620210218357.png


原因


pip默认将Python包安装到系统目录(例如/usr/local/lib/python3.4).这需要root访问权限.

--user会在您的主目录中生成pip安装包,而不需要任何特殊权限.


相关链接:

python – “pip install –user …”的目的是么… - CocoaChina_一站式开发者成长社区

目录
打赏
0
0
0
0
2
分享
相关文章
【Python】 已解决:ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: ‘e:\anaconda\i
【Python】 已解决:ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: ‘e:\anaconda\i
1465 11
【Python】 已解决:ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: ‘e:\anaconda\i
【Python】已解决:ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: ‘e:\anaconda\in
【Python】已解决:ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: ‘e:\anaconda\in
1975 2
|
11月前
|
【报错】Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘/METADATA‘
【报错】Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘/METADATA‘
1171 1
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
|
11月前
An unexpected error was encountered while executing a WSL command. Common causes include access righ
An unexpected error was encountered while executing a WSL command. Common causes include access righ
132 0
Could not install packages due to anEnvironmentError: [WinError 5] 拒绝访问
Could not install packages due to anEnvironmentError: [WinError 5] 拒绝访问
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
170 0
configure: error: You requested LIBYUV but not found...die
configure: error: You requested LIBYUV but not found...die
124 0
成功解决ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。backend_agg.cp36
成功解决ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。backend_agg.cp36
成功解决ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。backend_agg.cp36
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等