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

目录
相关文章
|
7月前
|
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‘
207 0
|
7月前
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
357 0
|
Java
Error: A JNI error has occurred, please check your installation and try again
Error: A JNI error has occurred, please check your installation and try again
199 0
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
143 0
configure: error: You requested LIBYUV but not found...die
configure: error: You requested LIBYUV but not found...die
97 0
|
Shell
遇到INSTALL_FAILED_VERIFICATION_FAILURE怎么办
遇到INSTALL_FAILED_VERIFICATION_FAILURE怎么办
1137 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