我正在学习django,我得到了这个错误:
python: can't open file '.manage.py': [Errno 2] No such file or directory
运行时
python .\manage.py makemigrations
我知道我在manage.py文件所在的文件夹中运行该命令,那么会出现什么问题呢?
这是我的目录树:
.
├── 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
下面是我运行上述命令的pwd:
(djangotut) ether@ether:~/Documents/django-react-tutorial/music_controller$
发布于 2020-11-08 05:18:48
您不需要在路径中使用反斜杠。正确的命令应该是:python manage.py makemigrations
当然,您将在manage.py所在的目录中使用它。
https://stackoverflow.com/questions/64732468
复制相似问题