Django启动新项目错误 [英] Django start new project error

查看:51
本文介绍了Django启动新项目错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows Vista上安装了Python2.6和Django1.2.4.或者,所以我认为django已安装.我通过打开python shell(在python文件夹中的命令提示符)并输入以下内容来对此进行测试:

i have installed Python2.6 and Django1.2.4 on windows vista. or so i think django is installed. i test it this by opening the python shell(command prompt from the python folder) and typed this:

import django 
django.get_version()

结果为"1.2.4".据此,我了解到首先是python有效,其次是django被安装.

The result was "1.2.4". From this i understand that firstly python works, and second that django is installed, recognized.

在Django网站上的教程之后,我陷入了第一件事:创建项目

Following the tutorial from Django website i get stuck on the first thing: creating a project

django-admin.py startproject mysite

我在一个新的命令提示符窗口中编写了此文件,chdir进入了一个文件夹,我决定将其保留在项目中,然后在上面的行中编写.错误是这样的:

I wrote this in a new command prompt window, chdir my way to a folder i decided it'll keep the project and then wrote the line above. The error is this:

E:\Workspace>django-admin.py startproject mysite

'django-admin.py'不被识别为内部或外部命令,可操作的程序或批处理文件.

'django-admin.py' is not recognized as an internal or external command, operable program or batch file.

我尝试在行之前写"python",但没有.我在PATH的环境变量中添加了django的bin文件夹的路径以及python的路径.我在Python/Scripts文件夹中有django-admin.py文件.我知道这是一个非常容易的新手错误,但目前它使我无法使用.如果有人经历了此错误或知道此错误,将非常感谢您的帮助.

I tried with writting "python" before the line but no. I added in the Environmental Variables , in the PATH, the path to the bin folder of django and the path to python. I have the django-admin.py file in the Python/Scripts folder. I understand this is a very easy , newbie mistake, but it currently blocks me. If somebody has gone through this error or knows about it, a bit of help would be much appreciated.

无论哪种方式都谢谢你!

Thank you either way!

推荐答案

您是否将Python/脚本添加到PATH环境变量中?您需要重新启动所有打开的命令提示符,以使PATH更改生效.

Did you to add the Python/Scripts to the PATH environmental variable? You'll need to restart any command prompts you have opened for the PATH change to take effect.

这篇关于Django启动新项目错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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