skip to Main Content

I wrote in terminal in Visual Studio Code like this command: python manage.py startapp shop. I was counting to create new Django app but it threw an error like this: C:UsersvpoloAppDataLocalProgramsPythonPython311python.exe: can’t open file ‘C:UsersvpoloDocumentscoursesmanage.py’: [Errno 2] No such file or directory.
Can You help me?

I’ve tried to create a new Django app.

2

Answers


  1. The error seems to be of the path check the filename and the correct relative path in the terminal.

    Login or Signup to reply.
  2. You should write the command in the path which has manage.py
    If you created a project with the name shop with this command

    django-admin startproject shop
    

    path of the manage.py will be in shop/shop

    If you don’t need the nested shop, use this command

    django-admin startproject shop .
    

    full stop doesn’t create a nested project, then manage.py will be in the path ../shop/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search