Python 使用 pip 安装 Django
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15491806/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing Django with pip
提问by That_User
Trying to install Django from cmd with pip.
尝试使用 pip 从 cmd 安装 Django。
Python 2.7.3, Windows 7
Env var(...C:\Python27;C:\Python27\Lib\site-packages\;C:\Python27\Scripts\;)
help("pip")
.
.
.
.
VERSION
1.3.1
pip install Django
File "<stdin>", line 1
pip install Django
^
SyntaxError: invalid syntax
采纳答案by arulmr
Run pip install djangofrom windows command prompt instead of python shell.
运行pip install django从Windows命令提示符,而不是蟒蛇外壳。
回答by pynovice
pipis not run from the Python shell. Run this from the Command prompt.
pip不是从Python shell. 从Command prompt.
pip install Django
It will install the latest Django 1.5.
它将安装最新的 Django 1.5。
回答by johnyOne
pip install django==1.4
or
或者
pip install django==1.6
or
或者
pip install django
回答by Aryak Sengupta
In addition to user2032220's answer and arulmr's answer, try to install Djangowithin a Virtual Environment.It will help you in the long run.
除了user2032220 的回答和 arulmr 的回答,尝试在虚拟环境中安装Django。从长远来看,它会帮助你。
Here's the way to do it :
这是这样做的方法:
回答by Fei Zheng
under the folder C:\Python27\Scripts(or the folder you installed pip), press SHIFT and right clicka blank space then select open command window here,
run
在文件夹C:\Python27\Scripts(或您安装的文件夹pip)下,按SHIFT 并右键单击空白处然后选择在此处打开命令窗口,运行
pip install Django
回答by Mocellin
Running Python34you should go to c:Python34, folder Scripts, and type
运行Python34你应该去c:Python34,文件夹脚本,然后输入
pip install django.

