无法让 python.manage.pysyncdb 工作
我刚刚创建了我的第一个 django 应用程序,在 settings.py 中初始化了变量 DATABASE_ENGINE 和 DATABASE_NAME,但是现在当我运行 python manage.pysyncdb 时,出现以下错误 有人可以帮忙吗?这是否与安装了两个 python 版本有关?
我是 django/python 菜鸟,请帮忙。谢谢!!
my-computer:~/Django-1.1.1 mycomp$ python manage.py syncdb
/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: can't open file 'manage.py': [Errno 2] No such file or directory
my-computer:~/Django-1.1.1 mycomp$ export PATH=/Users/mycomp/bin:$PATH
I just created my first django app, initialized variables DATABASE_ENGINE and DATABASE_NAME in settings.py, but now when I run python manage.py syncdb, I get the following error Can somebody help? Does this have to do with having two python versions installed?
I'm a django/python noob, please help. thanks!!
my-computer:~/Django-1.1.1 mycomp$ python manage.py syncdb
/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: can't open file 'manage.py': [Errno 2] No such file or directory
my-computer:~/Django-1.1.1 mycomp$ export PATH=/Users/mycomp/bin:$PATH
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要从项目的根文件夹运行manage.py。看起来您正在从 Django 安装文件夹尝试。
You need to run manage.py from the root folder of your project. Looks like you are trying from the Django install folder.