python - "pip install Django"给出异常

标签 python django

我正在尝试在命令提示符下使用“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/

相关文章:

python - django - 'module' 对象没有属性 'serialize'

django - 对于扩展信息,我应该使用 Django 的多表继承还是显式的 OneToOneField

python - 对于非常大的文件来说,Python "cksum"等效项是什么?它是如何工作的?

python - Django collectstatic 没有那个文件或目录

python - SQL 跨列绝对值

python - 大型 Nginx/uwsgi 服务内容挂起 keepalive_timeout 秒

python - django.core.exceptions.FieldError : Local field 'email' in class 'User' clashes with field of similar name from base class 'AbstractUser'

jquery - 如何让 Django-Ajax-Selects 在 Django Admin 中工作?

python - 如何在函数内部打印 __init__() ?

python - 将两个字符串与备用字符合并为输出