Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 1.9 KB

File metadata and controls

47 lines (35 loc) · 1.9 KB

Getting VSCode and Python Up and Running 🏃‍♀🏃‍♂💨

Step 1: Download and Install VSCode

  1. Go to the VS Code website: vscode
  2. Click the "Download for Mac" button (make sure it says "Universal" or matches your chip, like Intel or Apple Silicon/M1/M2/M3
  3. Once the '.zip' file downloads, double-click it to extract and open the Visual Studio Code app.
  4. Move VS Code to Applications folder: Drag it into your Applications folder for easy access.

Step 2: Install Python

  1. Go to the official Python website: python

  2. Click "Download Python 3.x.x" (the latest stable version).

  3. Open the '.pkg' file once downloaded and go through the installer steps.

  4. After installation, open Terminal (you can search for it via Spotlight), and type:

    python3 --version

You should see something like 'Python 3.12.3' (or whatever version you installed).

Step 3: Add Python Extension in VS Code

  1. Open VS Code
  2. Click the Extensions icon on the sidebar (or press ⇧⌘X).
  3. In the search bar, type Python and install the official one from Microsoft
  4. Once installed, it will help with syntax highlighting, running Python files, etc.

Step 4: Set Python Interpreter in VS Code

  1. Open a Python file (or create a new one with '.py' extension).

  2. In the bottom-left corner, you’ll see Python x.x.x. Click it.

  3. Choose the interpreter that says something like:

    /usr/local/bin/python3

Step 5: Run Python Code

  1. Create a file like hello.py

  2. Write:

    print("Hello, world!")

  3. Right-click in the editor and choose "Run Python File in Terminal", or click the Run ▷ button in the top-right.

  4. Yay! It works! (Celebration wiggle).

✅ Done!

You have now:

  • Downloaded and installed VS Code
  • Downloaded and installed Python on your computer
  • Set up Python in VS Code
  • Ran your very first python code!