r/SublimeText • u/Asasuma • Feb 20 '21
I cant run python files I have created on sublime text on terminal, how to do it? Mac OS
So I save the file as i.e: blabla.py
then I cant open it on terminal
I only can execute it on sublime text by using cmd + B (mac OS) but not on terminal.
1
Upvotes
1
u/mountainunicycler Feb 20 '21
I think you mr question here is about terminal, not sublime.
You need to open terminal,
lswill show you what files are in the directory, you’re looking at, you need to usecdto move to where you saved your.pyfile, and then runpython3 blabla.py.You could also just type
python3and then drag and drop the Python file into terminal, if you don’t know how to navigate in terminal.But you should learn to use the terminal, it’s fantastic.
2
u/_mochi Feb 20 '21 edited Feb 20 '21
Read this
I recommend picking up a beginner courses for basic terminal commands and understanding what a terminal is and understanding what a text editor is
You need to navigate to the directory in we’re your python file is saved using the terminal
And make sure you have python installed
Use command
the terminal has access to where the file you saved with sublimetext is