Where is the code of the lessons?
In The Python Handbook. It comes with the clean source code of every lesson and the full solutions.
I use Google Analytics cookies to count visits and see which pages help you. The data may go to Google in the USA. It only runs if you allow it, and you can change this any time in Cookie settings.
Windows and Mac



8,400+ members

· 11,200+ students
Windows
Click Python 3.15, the link under the yellow button.
Did you click the yellow button and get the Python install manager? That works too: install it, then type python once in the Terminal (step 3).
Mac
Click the yellow button.
Mac
Open the downloaded .pkg file. Click Continue on each screen, then Agree and Install.
Enter your Mac password when it asks.
Windows
Open the Start menu, type Terminal and press Enter. Then type this and press Enter:
python --version Python 3.15.0
Mac
Press Cmd + Space, type Terminal and press Enter. Then type this and press Enter:
python3 --version Python 3.15.0
Windows
Run the downloaded installer with the default options.
Mac
Drag Visual Studio Code from your Downloads into Applications. If you see a .zip, double-click it first.
In Visual Studio Code, click the Extensions icon on the left, search Python and install Python by Microsoft.
Skip the sign-in and the AI chat it offers. The course needs neither.
On a Mac, where the videos press Ctrl, press Cmd. Only the run shortcut below stays Ctrl + R.
File > Open Folder: make a folder for your code and select it. When asked, click Yes, I trust the authors. With No, the play button is missing.
Click the New File icon, name the file hello.py, type the line below and save.
print("Hi, this is my first python code")
Click the play button at the top right, Run Python File. The terminal shows the run command first, then your output. That first line is normal.
'python' is not recognized
Run the installer again: Modify, Next, tick Add Python to environment variables, Install. Then open a new terminal.
'python' is not recognized, with the install manager
Start menu, Manage app execution aliases, switch on Python (default).
command not found: python
The Mac command is python3.
SyntaxError after python hello.py
You are inside Python's >>> prompt. Type exit(), then run the file again.
No play button
Click Manage in the Restricted Mode bar and trust the folder. Check that Python by Microsoft is installed and the file ends with .py.
The program seems to hang
It waits for input(). Type your answer in the terminal and press Enter.
The terminal shows another Python version
Ctrl + Shift + P, Python: Select Interpreter, pick 3.15.
Output in the OUTPUT tab, input() does not work
That is the Code Runner extension. Use the play button of the Python extension.
In The Python Handbook. It comes with the clean source code of every lesson and the full solutions.
Python and Visual Studio Code, both free. The setup guide on this page shows every step.
Yes. Python and Visual Studio Code run on Windows and Mac. Pick Mac in the setup guide, and it shows the Mac steps.
Not with the free course. The Ultimate Python Mastery in the Academy comes with quizzes, three projects and a certificate.