0

I'm trying to learn about the Django framework and I've started by running a project.

I seem to have some trouble on Pycharm:

 PyShop1 % $python3 manage.py runserver

When I input this it outputs:

zsh: command not found: manage.py

Can someone help me rectify the issue, as I can't seem to find the solution to this anywhere. I definitely have a manage.py file, as I can see it on the Project section of PyCharm.

Also If it helps I'm using MacOS

Savith R
  • 3
  • 1
  • is `PyShop1 % $python3 manage.py runserver` what you typed into a console or `manage.py runserver`? – smac89 Nov 01 '21 at 14:57
  • @smac89 I typed in: $python3 manage.py runserver – Savith R Nov 01 '21 at 15:05
  • Ok so that's your problem. `$python3` will be expanded by the shell and most likely evaluates to an empty string. Then the shell only sees `manage.py` next, which it thinks is a command, but fails when there is no such command as `manage.py` in the `PATH`. Perhaps you meant to type `python3 manage.py runserver`? Also make sure the `manage.py` file is in the same directory where you type that command – smac89 Nov 01 '21 at 15:08
  • Now it is saying '[Errno 2] No such file or directory' – Savith R Nov 01 '21 at 15:17
  • 1
    Update: I got it fixed. Turns out I was in the wrong directory the whole time... – Savith R Nov 01 '21 at 15:23

1 Answers1

1

Did you check are you executing this command in proper directory?

If your manage.py file is stored in directory 'app' you should open terminal inside this directory and execute this command.

best regards,

azarjaved
  • 63
  • 5