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

目录
相关文章
|
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‘
8 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
|
6月前
|
Python
Could not install packages due to anEnvironmentError: [WinError 5] 拒绝访问
Could not install packages due to anEnvironmentError: [WinError 5] 拒绝访问
|
6月前
|
Python
ERROR: Failed building wheel for osgeo
ERROR: Failed building wheel for osgeo
150 0
configure: error: You requested LIBYUV but not found...die
configure: error: You requested LIBYUV but not found...die
68 0
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
117 0
|
Shell
遇到INSTALL_FAILED_VERIFICATION_FAILURE怎么办
遇到INSTALL_FAILED_VERIFICATION_FAILURE怎么办
862 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
ERROR: Could not install packages due to an Oserror: [Errno 13] Permission denied: RECORD Consider
ERROR: Could not install packages due to an Oserror: [Errno 13] Permission denied: RECORD Consider
934 0
ERROR: Could not install packages due to an Oserror: [Errno 13] Permission denied: RECORD Consider