text: A quick tutorial on how to run either a Python 2.7 script or a Python 3.5 script using Sublime Text 3.
  The contents of the sublime-build file are:
  {
  “cmd”: [“/usr/bin/python3”, “$file”],
  “selector”: “source.python”,
  “file_regex”: “file “(…*?)”, line([0-9]+)”
  }
  If you are using either Mac or Windows, instead of using the “whereis” command to find your installation path to Python, you can just run the following script, which will output the path to where Python is installed on your machine:
  “`
  import os
  import sys
  os.path.dirname(sys.executable)
  “`
  Website:
  43 Comments
  John KeaneApril 24, 2020
  Excellent Video. Thank You.
  Minecraft killerApril 24, 2020
  import pygame
  pygame.init()
  width = 800
  height = 600
  screen = pygame.dislay.set_mode((width,height))
  i am getting a error can you tell me why and your tutorials are super
  M CApril 24, 2020
  I checked the path by typing "whereis python" in Terminal and it returns "/usr/bin/python". Should i modify your code above and replace python3 with python?
  alaindioulyApril 24, 2020
  thank you so much for your clear and straight-to-the-point video
  Munachi MarcelApril 24, 2020
  I don't have a terminal in my system what's an alternative
  Loop loopApril 24, 2020
  how you run the script?
  Vaibhav PandeyApril 24, 2020
  thank you so much.It worked
  Eshaan DevganApril 24, 2020
  For those people who were unable to locate path with whereis use which instead as which python3.
  prospectnycApril 24, 2020
  Thank you!
  Daven ThakkarApril 24, 2020
  I keep getting a message saying permission denied in my terminal. How can I fix that
  Kha NguyễnApril 24, 2020
  So, Can chance version 3.5 into version 3.7 ?
  KINGTERRARIAGAMINGMARIO KTGM/April 24, 2020
  um i got this error as shown below:
  C:UsersUserAppDataLocalProgramsPythonPython37python.exe: can't find '__main__' module in ''
  this is the build content i think its correct:
  {
  "cmd": ["C:/Users/User/AppData/Local/Programs/Python/Python37/python.exe", "$file"],
  "selector": "source.python",
  "file_regex": "file "(…*?)", line([0-9]+)"
  }
  i moved my python app file to a text box to see the path and copied it to the path box, and the build file name is Python3.sublime-build
  can it be fixed?
  if you want to see the full box of the error content then read down below:
  C:UsersUserAppDataLocalProgramsPythonPython37python.exe: can't find '__main__' module in ''
  [Finished in 1.0s with exit code 1]
  [cmd: ['C:/Users/User/AppData/Local/Programs/Python/Python37/python.exe', '']]
  [dir: C:Program FilesSublime Text 3]
  [path: C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:UsersUserAppDataLocalSmartbarApplication;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:UsersUserAppDataLocalMicrosoftWindowsApps;]
  AndR3 Av3l4sApril 24, 2020
  Your are amazing thnkx so much✴
  Reza ZandiApril 24, 2020
  I was about to just give up on being a software developer… until I finally got it lol. I'm on a Mac, so I was having trouble just like everyone else. Here's what worked finally,
  {
  "cmd": ["/Library/Frameworks/Python.framework/Versions/3.7/bin/python3", "$file"],
  "selector": "source.python",
  "file_regex": "file "(…*?)", line([0-9]+)"
  }
  Make sure to keep that "$file" in there, and just add the "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3" part to it WITH a comma as show above. Also, you can use type -a python3 in terminal to find out where your python3 is located. Your welcome!
  huy hung taApril 24, 2020
  tks
  ErickApril 24, 2020
  Thanks!
  mohammed zakeerApril 24, 2020
  where u copy this code in untitle file
  Alexandre VieiraApril 24, 2020
  Thank you, it worked perfectly.
  Almirr ShakiilApril 24, 2020
  doesn't work
  Mario PellegrinoApril 24, 2020
  the "whereis" command is not found on my command prompt
  Michael B BApril 24, 2020
  Lets say you want to edit the build file system / menu how would you go about doing that?
  LmaonadeJuiceApril 24, 2020
  just saying if it doesnt work add an indent to the text inside the {}
  Diego ChavarroApril 24, 2020
  Thanks
  Ghada JWApril 24, 2020
  you are the best thank you so much <3
  Gibson FarabowApril 24, 2020
  If you are on mac and do
  os.path.dirname(sys.executable)
  you may need to add python3 to the end of it after bin/ (I did).
  Steve GaripApril 24, 2020
  thanks 👍🏽👍🏽
  Victor VrabiiApril 24, 2020
  Thank you! you save my time)
  Patricio ContrerasApril 24, 2020
  Muchas gracias, funciona perfecto.
  ErickApril 24, 2020
  Thank you!
  dhf336April 24, 2020
  Just the video I was looking for ! Thank you .
  julio rrApril 24, 2020
  /usr/bin/python3.6: can't find '__main__' module in ''
  # i have the last version, but after of save and load… error…
  (ubuntu 18.04)
  Christian picón calderonApril 24, 2020
  In the new versions of mac OS, the command whereis sometimes doesn't work, instead, you could try the command -which python3-. Hopefully it can helps you.
  Martín FernándezApril 24, 2020
  hi first sorry, please mi poor english, iam learning python in youtube in linux mint with sublime tex now i know how to use python3 but how i do tools sublimeREPL run current file in python 3??
  WavvyApril 24, 2020
  it says python is not recognized as an internal command, operable program or batch file plllsss help!
  Tiffany SungApril 24, 2020
  Thank you so much for this tutorial. I've been struggling with this for a long time.
  Edward DalcoyApril 24, 2020
  you are a life saver! thank you very much.
  Johny WalkerApril 24, 2020
  Hey man, nice video but I have a question.
  My "untitled.sublime-build" is contain only following line:
  {
  "shell_cmd" : "make"
  }
  I am running sublime on Ubuntu 18.04 LTS
  vinodh venugopalanApril 24, 2020
  Not able to get sublime to run python 3 code on windows 10. Environment variables are set, but no luck. Welcome your suggestion to fix this.
  Avijeet KarmakerApril 24, 2020
  I am facing input output problem… i can not get output if i use import sys and want to print any variable using this value
  code:
  import sys
  n = int(input("enter a number : "))
  print("the number is : " + n)
  output:
  enter a number :
  but when i enter a number , I dont get the printed line "the number is <any number>"
  Iñaki M LongaApril 24, 2020
  I'm having the same problem as some of the other people. "whereis" won't return anything. I'm using a MacBook Pro.
  I tried running the script below on Sublime, but I'm not getting anything either. Help!
  import os
  import sys
  os.path.dirname(sys.executable)
  Caden DavidsonApril 24, 2020
  Hello, I believe I've correctly followed all the steps in this video, but when I run my Python 3 script using the Python3 build, I get this message down in the console:
  [Errno 13] Permission denied
  [cmd: ['/Library/Frameworks/Python.framework/Versions/3.6/bin', '/Users/hp2/Desktop/pythonstuff/test.py']]
  [dir: /Users/hp2/Desktop/pythonstuff]
  [path: /Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands]
  [Finished]
  I am using macOS 10.13.2 (High Sierra) and Sublime Text 3. I used the directory '/Library/Frameworks/Python.framework/Versions/3.6/bin' for the Python3 build, which is the directory I got when I ran the os.path.dirname(sys.executable) line. Any insights?
  I believe the problem has something to do with the permissions in one or more of my directories, but I have no idea what the specific problem is or how to fix it.
  EDIT: Now this appears to be a pointless comment, as I have found the solution here:
  I simply changed the directory for the Python3 build to '/usr/local/bin/python3.6'
  I will leave this comment up in case anybody else comes across the same problem.
  Vincenz BuhlerApril 24, 2020
  when I run the whereis command, nothing happens. I used the exit command and even closed out the terminal entirely. Not able to locate where Python 3 downloaded on my computer.
  Freya van OdinApril 24, 2020
  thanks for copying the message in the comments because I do not get that message and would would have had to write it my self, because mine says:
  'python' is not recognized as an internal or external command,
  operable program or batch file.
  [Finished in 0.1s]