添加“django-admin.py";Windows 7 上的命令行路径 [英] Add "django-admin.py" path to command line on Windows 7

查看:27
本文介绍了添加“django-admin.py";Windows 7 上的命令行路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试将 django-admin.py 路径添加到 Windows 7 上的命令行.

I've been trying to add the django-admin.py path to command line on Windows 7.

我尝试过这样做:

C:>set django-admin.py = C:Python27Scriptsdjango-admin.py

但是cmd 告诉我:

'django-admin.py' is not recognized as an internal or external command.

那么如何在 Windows 7 上将 django-admin.py 路径添加到命令行?

So how can I add django-admin.py path to command line on Windows 7?

我需要它,因为稍后我会这样做:

I need it because later I'm doing this:

  C:UsersMichaelDesktopmysite>django-admin.py startproject mysite

谢谢.

推荐答案

尝试以下命令.

set path=%path%;c:python27scripts

PATH 仅为您在其中运行上述命令的 cmd.exe 设置.

PATH is set only for the cmd.exe in which you run the above command.

更新

永久设置路径:

  1. 右键单击桌面上的我的电脑.
  2. 点击左侧的高级系统设置.
  3. 点击环境变量.
  4. 添加或更新 PATH 变量:
    • 如果不存在,则创建一个,并将值设置为C:python27scripts
    • 如果存在,将 ;C:Python27scripts 附加到现有值.
  1. Right click My computer in the desktop.
  2. Click Advanced System Settings on the left.
  3. Click Environmental Variable.
  4. Add or Update PATH variable:
    • If it does not exist, create one, and set value as C:python27scripts
    • If it exist, append ;C:Python27scripts to existing value.

这篇关于添加“django-admin.py";Windows 7 上的命令行路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆