简体   繁体   English

python:创建Django应用时无法打开文件“ manage.py”

[英]python: can't open file 'manage.py' when I create django app

I created a project named testdj, and under the directory /tmp/python-test/testdj/testdj/ , I want to create a django app, so I use the below command: 我创建了一个名为testdj的项目,并且在目录/tmp/python-test/testdj/testdj/ ,我想创建一个Django应用,因此我使用以下命令:

aircraftdeMacBook-Pro:testdj ldl$ python manage.py startapp TestModel
python: can't open file 'manage.py': [Errno 2] No such file or directory

But the the upper error, can't open file 'manage.py' there. 但是上面的错误, can't open file 'manage.py'此处can't open file 'manage.py'

I find the stack overflow, there is some the same error, but they are not when creating app occurs. 我发现堆栈溢出,有一些相同的错误,但是创建应用程序时却没有。

i guess you are using django app, 我猜你正在使用django应用程序,

so first 所以首先

pip install django
django-admin startproject project_name
django-admin startapp app_name

python manage.py runserver

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python Django 初学者:打不开manage.py - Python Django Beginner: can't open manage.py Django-Fabric&collecstatic-无法打开文件'manage.py' - Django - Fabric & collecstatic - can't open file 'manage.py' 如何修复 python:无法打开文件 '//manage.py':[Errno 2] Django 中没有此类文件或目录 - How to fix python: can't open file '//manage.py': [Errno 2] No such file or directory in Django Django 1.8 python:无法打开文件'manage.py':[Errno 2]没有这样的文件或目录 - Django 1.8 python: can't open file 'manage.py': [Errno 2] No such file or directory python3: 无法打开文件 '/app/manage.py': [Errno 2] 没有那个文件或目录 - python3: can't open file '/app/manage.py': [Errno 2] No such file or directory 我打不开manage.py - I can't open manage.py 当运行 docker-compose up 我得到 python: can't open file 'manage.py': [Errno 2] No such file or directory - When run docker-compose up I get python: can't open file 'manage.py': [Errno 2] No such file or directory Azure Web 应用程序 - Python:无法打开文件“manage.py”:[Errno 0] 无错误 - Azure Web App - Python: can't open file 'manage.py': [Errno 0] No error python: 无法打开文件 'manage.py': [Errno 2] 编写时没有这样的文件或目录 docker - python: can't open file 'manage.py': [Errno 2] No such file or directory when compose docker 为什么我不能用 django 运行“python manage.py startup APP_NAME”? - Why can't I run "python manage.py startup APP_NAME" with django?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM