[英]python: can't open file '.manage.py': [Errno 2] No such file or directory
Im learning django and i get this error:我正在学习 django,但出现此错误:
python: can't open file '.manage.py': [Errno 2] No such file or directory
when running跑步时
python .\manage.py makemigrations
I know im running the command in the same folder as my manage.py file, so what can be the issue?我知道我在与 manage.py 文件相同的文件夹中运行命令,那么问题出在哪里?
This is my directory tree:这是我的目录树:
.
├── api
│ ├── admin.py
│ ├── apps.py
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── models.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── manage.py
└── music_controller
├── asgi.py
├── __init__.py
├── settings.py
├── urls.py
└── wsgi.py
Here is the pwd where i run above command:这是我在上面运行命令的密码:
(djangotut) ether@ether:~/Documents/django-react-tutorial/music_controller$
You don't need to use a backslash in the path.您不需要在路径中使用反斜杠。 The correct command would be: python manage.py makemigrations
正确的命令是: python manage.py makemigrations
Naturally you will be using this in the directory where manage.py resides.当然,您将在 manage.py 所在的目录中使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.