Reputation: 1221
Im learning django and i get this error:
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?
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$
Upvotes: 0
Views: 4400
Reputation: 1
Today I've faced this issue while doing my django project and stuck for more than 2 hours nd this one helped me.
Upvotes: 0
Reputation: 81
You don't need to use a backslash in the path.
The correct command would be: python manage.py makemigrations
Naturally you will be using this in the directory where manage.py resides.
Upvotes: 3