我正在尝试在命令提示符下使用“pip install django”在 Windows 10 上安装 django,它给了我这个异常。我在这里做错了什么?
C:\Users\Amit>pip install django
Collecting django
Using cached Django-1.9.2-py2.py3-none-any.whl
Installing collected packages: django
Exception:
Traceback (most recent call last):
File "c:\program files (x86)\python35-32\lib\site-packages\pip\basecommand.py", line 209, in main
status = self.run(options, args)
File "c:\program files (x86)\python35-32\lib\site-packages\pip\commands\install.py", line 317, in run
prefix=options.prefix_path,
File "c:\program files (x86)\python35-32\lib\site-packages\pip\req\req_set.py", line 731, in install
**kwargs
File "c:\program files (x86)\python35-32\lib\site-packages\pip\req\req_install.py", line 841, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "c:\program files (x86)\python35-32\lib\site-packages\pip\req\req_install.py", line 1040, in move_wheel_files
isolated=self.isolated,
File "c:\program files (x86)\python35-32\lib\site-packages\pip\wheel.py", line 343, in move_wheel_files
clobber(source, lib_dir, True)
File "c:\program files (x86)\python35-32\lib\site-packages\pip\wheel.py", line 314, in clobber
ensure_dir(destdir)
File "c:\program files (x86)\python35-32\lib\site-packages\pip\utils\__init__.py", line 82, in ensure_dir
os.makedirs(path)
File "c:\program files (x86)\python35-32\lib\os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python35-32\\Lib\\site-packages\\django'
最佳答案
您需要管理员命令提示符才能安装 Python 包。以下是如何 Start a Command Prompt as an Administrator .
关于python - "pip install Django"给出异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35498868/