简体   繁体   中英

pip install django error on windows 7

Tried installing django on my Windows 7 with Python version 3.4.3 using command line(Run as Administrator) with command:

pip install django

Here is the error:

C:\Windows\system32>pip install django
Collecting django
  Using cached Django-1.8.1-py2.py3-none-any.whl
Installing collected packages: django
  Exception:
  Traceback (most recent call last):
    File "C:\Python34\lib\site-packages\pip\basecommand.py", line 246, in main
      status = self.run(options, args)
    File "C:\Python34\lib\site-packages\pip\commands\install.py", line 352, in r
un
      root=options.root_path,
    File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 693, in instal
l
      **kwargs
    File "C:\Python34\lib\site-packages\pip\req\req_install.py", line 817, in in
stall
      self.move_wheel_files(self.source_dir, root=root)
    File "C:\Python34\lib\site-packages\pip\req\req_install.py", line 1018, in m
ove_wheel_files
      isolated=self.isolated,
    File "C:\Python34\lib\site-packages\pip\wheel.py", line 237, in move_wheel_f
iles
      clobber(source, lib_dir, True)
    File "C:\Python34\lib\site-packages\pip\wheel.py", line 215, in clobber
      shutil.copyfile(srcfile, destfile)
    File "C:\Python34\lib\shutil.py", line 108, in copyfile
      with open(src, 'rb') as fsrc:
  PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Admin\\AppData\\Loc
al\\Temp\\pip-build-5dmxxqdw\\django\\django\\core\\checks\\security\\base.py'

Please help.

The folder C:\\Python34 was set as Read-only. I changed the property and it install successfully.

我通过将C:\\ Python27文件夹重命名为某个随机名称,然后返回C:\\ Python27并再次运行命令来解决此问题。

我以管理员身份打开命令提示符并运行“ pip install Django”命令解决了此问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM