为什么我可以在Windows 10上安装带有PIP的Python软件包?
自从我尝试升级它以来,我就在Windows 10 PC上与PIP进行了这场跑步战斗。我尝试使用pip升级
升级它。之后,PIP停止工作。我想使用pip安装pygame
在我的PC上安装PyGame,然后收到有关操作系统的以下错误消息:
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Python310\\Include\\pygame'
Consider using the `--user` option or check the permissions.
每当我尝试在PC上安装任何Python软件包时,我会收到相同的错误消息。请我做什么来纠正这个问题?
I have had this running battle with pip on my windows 10 PC ever since I tried to upgrade it. I tried to upgrade it with pip upgrade
. After that, pip has stopped working. I wanted to install Pygame on my pc with pip install pygame
and I got the following error message about my operating system:
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Python310\\Include\\pygame'
Consider using the `--user` option or check the permissions.
I get the same error message anytime I try to install any python package on my pc. Please what can I do to correct this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需键入您要使用用户许可执行的命令,如果您不想更改权限:
如果要更改用户权限,请按照以下步骤操作:
只需 更改访问权限,其中特定软件包将安装。
在 Windows 10 上:
c:\ program文件(x86)\ python37
properties
。在这种情况下,python37
文件夹。安全性
选项卡,单击编辑
按钮,并允许完全控制 用户组。请记住单击应用
。以下是所需设置的示例:

Just type the command you want execute with the user permission, if you don't want to change the permission:
and if you want to change user permission then follow these steps:
Just change the access permission, where the particular package is going to install.
On Windows 10:
C:\Program Files (x86)\Python37
Properties
. In this case, thePython37
folder.Security
tab, clickEdit
button and allow full control for the Users group. Remember to clickApply
.Below is an example of desired settings:

解决方案#1
-----或----
解决方案#2
使用
运行PIP安装 - 用户
frag命令:
python -m pip install-pip install-upgrade pip-用户
Solution #1
---- OR ----
Solution #2
Run Pip Install with
--user
flagCommand:
python -m pip install --upgrade pip --user