1

I've been writing a Tkinter program and I don't want the console to show, so I used a .pyw file. However the program ran with an error that said the program could run usr/bin/python3, so I removed the shebang line, and it worked, but do I need a shebang line? Or should I keep it as is.

  • Does it work with the shebang? -No. Does it work without it? -Yes. Do you need a shebang line? -Provided that it works without one, you probably don't. – ForceBru Apr 21 '19 at 19:17

1 Answers1

1

If it works without the shebang line:

If it didn't work with the shebang line, either:

  • You made a typo, or
  • You gave it an incorrect path to your version of Python

Make sure you know exactly where Python is installed on your device:

(To anyone simply copy-pasting what you see in tutorials - without a good grasp of what it's doing: Try googling terms like "shebang line" and figure out what they might be doing behind the scenes)