1

I am attempting to create a django app but I am getting the 'touch' not recognized as internal or external command' error.

   C:\Users\blake\Documents\ProgrammingProjects\orwell84\apps> touch __init__.py
  'touch' is not recognized as an internal or external command, 
   operable program or batch file.

my python version is 3.7.3 and my django version is 2.2.4 . Am I missing something ?

Underoos
  • 4,708
  • 8
  • 42
  • 85
  • 2
    Touch is a UNIX command, it is not available on windows but it is not related to python or django. For alternatives to touch see https://stackoverflow.com/questions/30011267/windows-equivalent-of-touch-i-e-the-node-js-way-to-create-an-index-html – Adam Feor Dec 14 '19 at 19:03
  • 2
    Most Django tutorials I've seen assume you're using a Unix-like OS (Mac, Linux, Ubuntu, ...). So, for any command-line stuff, you'll typically need to do a small amount of translation to get the tutorials to work on Windows :-(. If you don't want to deal with this, you might give something like [Cygwin](https://cygwin.com/install.html) a shot. Or, look into setting up a virtual machine. – helumpago Dec 14 '19 at 19:13

1 Answers1

1

Touch is the command specific to Linux and unix and not to Windows. Not to Django either (which is a framework).

If you want to create an empty file here's the command.

notepad __init__.py
Underoos
  • 4,708
  • 8
  • 42
  • 85