Table of Contents

Install Python

You can find the installer for Python at Python.org. Make sure to download the latest version.

If you are on an older version of MacOS (Between versions 10.9 and 10.12), you may encounter some issues with Python. Please make sure your system is up to date with a supported version of MacOS, or download an older version of Python.

The installer for Python is fairly straightforward. In most cases, you can simply hit “Install Now” and proceed, but please be certain to read the menus carefully as you go through the installer.

Note for MacOS

You may be prompted at the end of the installation process to install some SSL Certificates. You can do this by clicking on the link for “the Finder Window” on the screen, which will take you to a folder where you can execute “Install Certificates.command“. This will handle the certificate installation.

Python's Certificate Installation Prompt for MacOS

Install Visual Studio Code

Find the installer for VSCode for your system from the Visual Studio Code website.

Follow the steps in the installer.

Configure your Development Environment

Open your Workspace

  1. Open Visual Studio Code
  2. Along the left side of the screen, look for the “Files” icon.
  3. Click “Open Folder” and locate and select the folder you’ll want to run your code out of.
    • You may be prompted to trust the authors of files in the folder. Click “Yes, I trust the authors”

Enable Python Extensions

  1. On Windows, choose the File Menu. On MacOS, choose the Code menu.
  2. Choose Preferences, then select Extensions

  3. Scroll through the list, and click the Install button for Python
    • If you are prompted to install Command Line Developer Tools on MacOS, it may say it will run for an incredibly long amount of time. Click away from the screen (do NOT hit “stop”) and continue on. It will run in the background and usually complete within 20 minutes.
  4. Once the Extensions are installed, you may be prompted to select your Python Interpreter.

  5. If you do not see this prompt, you can still open the Python Interpreter option
  6. Press CONTROL+SHIFT+P which will open the preferences command. On MacOs type ⌘ + shift + P.
  7. Type python interpreter, and choose Python: Select Interpreter.

  8. Choose the interpreter for your environment (the path may vary)
    Select Python Interpeter

Disable Inherit Environment (MacOS Only)

Inherit Environment will cause myriad issues in VSCode on MacOS, causing it to not recognize the correct Python interpreter.

  1. While VSCode is open, go to the Code menu and select Preferences and then Settings.
  2. Type Inherit env in the search bar.
  3. Look for “Terminal > Integrated: Inherit Env
  4. If this is checked, please uncheck it.
  5. Restart VSCode by Quitting the application. This can be achieved by going to the Code menu and choosing Quit. Reopen the application afterward.

Set your Shell Profile

On Windows, VScode will want to use Powershell, which doesn’t really run Python well.

For Mac Users, you likely will not need to do this. If you do need to, you can follow these steps, but you will be changing bash to zsh.

  1. Click on the down arrow by the + on the right of the Terminal window
  2. Click Select Default Profile
  3. When the default profile options at the top open, choose command prompt
    Mac Users: 
    Choose zsh
  4. Click the + sign by the terminal window, and it should open a new CMD line terminal, which should allow you to execute your Python code.
  5. (Optional) Click the Trashcan by the old terminal to close it

You’re Ready!

Now that this is all done, your environment should be configured and ready to go!