尝试使用命令行(以管理员身份运行)使用命令行在我的Windows 7上使用Python版本3.4.3安装django:
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)
文件夹C:\ Python34设置为只读。我更改了属性并成功安装。
答案 1 :(得分:-1)
我通过将C:\ Python27文件夹重命名为某个随机名称,然后返回到C:\ Python27并再次运行该命令来解决此问题。
答案 2 :(得分:-1)
我通过以管理员身份打开命令提示符并运行' pip install Django'解决了这个问题。命令