Install Python
Go to python.org/downloads and download the latest version. Run the installer.
Go to python.org/downloads, download the macOS installer (.pkg), and run it โ accept the defaults.
brew install python works too.Confirm it worked
Open a terminal โ Command Prompt on Windows, Terminal on Mac โ and run:
You should see something like Python 3.12.x. If you get a "not recognized" or "command not found" error, close the terminal fully and reopen it โ if it still fails, you likely missed the PATH checkbox in step 1 and need to reinstall.
Install VS Code
Download it from code.visualstudio.com and install with default settings โ it's free, and it's what we'll use every session.
Add the Python extension
Open VS Code โ click the Extensions icon on the left sidebar (looks like four squares) โ search "Python" โ install the official one published by Microsoft.
Run your first file
In VS Code: File โ New File, save it as hello.py, and paste this in:
Hit the โถ Run button in the top-right corner (or right-click in the editor โ "Run Python File in Terminal"). If you see the message print at the bottom โ you're fully set up.
Quick troubleshooting
- "python is not recognized" (Windows) โ reinstall Python and make sure "Add Python to PATH" is checked.
- "python: command not found" (Mac) โ use
python3instead ofpythoneverywhere. - VS Code doesn't show the Run button โ make sure the Python extension is installed and you've opened a
.pyfile. - Still stuck? โ message us on Instagram @muneebslog or @xo_noirr and we'll sort it before the session.
That's it. You're dojo-ready ๐ฅท
Bring your laptop with this working setup to the next session โ 27 August. We'll take it from here.
Back to the Data Ninjas site โ