【发布时间】:2017-12-05 23:16:23
【问题描述】:
这个问题已经在互联网上被问了很多,但直到现在我还没有发现有人遇到和我一样的错误(也许我不够努力,谁知道呢)。
我正在使用 Windows 10 64 位 Acer 笔记本电脑(我不知道任何其他规格,它不是我的)并尝试安装 pygame‑1.9.3‑cp36‑cp36m‑win32。 whl(有人告诉我最好同时获得 Python 和 Pygame 的 32 位版本)。当我进入 PowerShell 时收到此错误:
PS C:\Program Files (x86)\Python36-32\Scripts> pip3 install pygame-1.9.3-cp36-cp36m-win32.whl
Processing c:\program files (x86)\python36-32\scripts\pygame-1.9.3-cp36-cp36m-win32.whl
Installing collected packages: pygame
Exception:
Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\program files (x86)\python36-32\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "c:\program files (x86)\python36-32\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "c:\program files (x86)\python36-32\lib\site-packages\pip\wheel.py", line 316, in clobber
ensure_dir(destdir)
File "c:\program files (x86)\python36-32\lib\site-packages\pip\utils\__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "c:\program files (x86)\python36-32\lib\os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python36-32\\Lib\\site-packages\\pygame'
不太清楚发生了什么。如果有人这样做,提前非常感谢。
【问题讨论】:
-
@skrx 没有“以管理员身份运行”选项,更不用说“运行”了,无论我在哪里右键单击。
-
右键cmd或者powershell。
-
@skrx 天哪,谢谢你,我现在感觉自己像个白痴。
-
没问题。可能发生在我们所有人身上。 ;)