[英]Why can't I install python packages with pip on windows 10?
自從我嘗試升級它以來,我一直在我的 Windows 10 PC 上與 pip 進行這場戰斗。 我嘗試使用pip upgrade
對其進行升級。 之后,pip 停止工作。 我想用pip install pygame
在我的電腦上安裝 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.
每當我嘗試在我的電腦上安裝任何 python 包時,我都會收到相同的錯誤消息。 請問我能做些什么來糾正這個問題?
解決方案#1
- - 或者 - -
解決方案#2
使用--user
標志運行 Pip 安裝
命令: python -m pip install --upgrade pip --user
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.