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_一站式开发者成长社区

目录
相关文章
|
4月前
|
安全 数据安全/隐私保护 开发者
【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
598 11
【Python】 已解决:ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: ‘e:\anaconda\i
|
4月前
|
Linux 数据安全/隐私保护 开发者
【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
1267 2
|
6月前
|
Python
【报错】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‘
196 0
|
6月前
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
问题提解决: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
|
Python
Could not install packages due to anEnvironmentError: [WinError 5] 拒绝访问
Could not install packages due to anEnvironmentError: [WinError 5] 拒绝访问
|
Python
ERROR: Failed building wheel for osgeo
ERROR: Failed building wheel for osgeo
349 0
configure: error: You requested LIBYUV but not found...die
configure: error: You requested LIBYUV but not found...die
95 0
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
141 0
|
Shell
遇到INSTALL_FAILED_VERIFICATION_FAILURE怎么办
遇到INSTALL_FAILED_VERIFICATION_FAILURE怎么办
1127 0
下一篇
无影云桌面