2015-05-10 54 views
0

試圖用Python版本3.4.3使用命令行上我的Windows 7安裝的Django用命令(以管理員身份運行):PIP在Windows上安裝的Django錯誤7

pip install django 

以下是錯誤:

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' 

請幫忙。

+0

嘗試下載它並輕鬆安裝它。 –

+0

你實際上是這臺機器上的管理員嗎?或者是工作領域的機器? – Leon

+0

是的。我確信@Leon。我甚至嘗試使用管理員帳戶來安裝Django,但仍產生此錯誤。 –

回答

0

文件夾C:\ Python34被設置爲只讀。我改變了屬性,併成功安裝。

-1

我解決了這個問題,將C:\ Python27文件夾重命名爲某個隨機名,然後返回到C:\ Python27並再次運行該命令。

-1

我通過以管理員身份打開命令提示符並運行'pip install Django'命令來解決此問題