

- #USING PYTHON ON MAC TERMINAL FOR MAC#
- #USING PYTHON ON MAC TERMINAL INSTALL#
- #USING PYTHON ON MAC TERMINAL FULL#
- #USING PYTHON ON MAC TERMINAL CODE#
Unless you want to create files and write all of your code inside of the CLI (if you think you do, check out Vim and godspeed!), you should get a text editor in which to write and edit your Python scripts. Ls(can be used in Windows PowerShell too)Ĭlear (can be used in Windows PowerShell too) List all files in the directory you are currently in (if you know a directory/directory path off the “home” directory you can use ~/) ActionĬd (does not output properly in PowerShell, so use the Mac command instead)Ĭd. However, you should probably stick to these more basic commands as you get started, so you can avoid running into any dangerous commands that can remove directories or run malicious scripts.
#USING PYTHON ON MAC TERMINAL FULL#
See a full list of MacOS commands or Windows commands for more.
#USING PYTHON ON MAC TERMINAL INSTALL#
Type in: cd pythonĪgain, your prompt should update to indicate you are in the “python” directory now.īelow is just a sampling of some of the basic commands you need to understand in order to install Python and run Python scripts. Let’s move into that directory in the CLI.

Now you can use your Finder or File Explorer (or just go to your Desktop) to visually confirm that your CLI command generated a new empty folder/directory on your Desktop called “python.” When you see your new command prompt line, the directory should have been created. Let’s create a new directory inside of “Desktop” called “python.” Type the command: mkdir python If you want to be sure, type “ls” in Linux/MacOS and Windows PowerShell or “dir” in Windows command prompt to see a listing of all of the files and folders within your current directory. Your command prompt should be updated to indicate you are in the “Desktop” directory as well. The output should likely be “/Users/ > Desktop.
#USING PYTHON ON MAC TERMINAL FOR MAC#
These CLIs will serve basic needs, but other shells for the CLI are available, such as Bash for Mac (or specially configured for Windows) and Windows PowerShell.

On Mac this is called the Terminal, and on Windows it is called the Command Prompt. Your PC or Mac will come with a built in CLI. To get started, you’ll need a couple of tools, a command line interface (CLI) and a text editor.

With machine learning and automation becoming a hot topic, you may have thought about getting started with learning a programming language, like Python.
