yappy twan
yappy twan

Reputation: 1221

python: can't open file '.manage.py': [Errno 2] No such file or directory

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

Answers (2)

Jyothish
Jyothish

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.

  1. first the error is manage.py file is not detected
  2. so in your project folder check for manage.py file
  3. if you find out manage.py file then check at which folder the manage.py file is present then note that folder name.
  4. then go to terminal first check your directory then type cd space folder name
  5. then type this command python manage.py runserver

Upvotes: 0

A___
A___

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

Related Questions