CS 111
  • Home
  • Syllabus
    (Spring 2025)

Configuring Spyder

Spyder is the program that we’ll be using to write code in Python. Before you begin using it, you should take the following steps to change its initial configuration:

  1. If you haven’t installed Spyder yet, do so now following the instructions in Lab 0.

  2. Run Spyder.

  3. Once Spyder opens, select the View menu and then select the Panes option. In the resulting list of items, you should uncheck all items except the first two: Editor and IPython Console.

    You should then see two separate panes within the Spyder window: the Editor pane on the left, and the IPython console on the right:

    Spyder with original prompt

  4. At the top of the IPython console, you should see a line that mentions some version of Python 3. It doesn’t matter what comes after the 3. All that matters is that you see Python 3 and not Python 2. If you see Python 2, you will need to uninstall Spyder and reinstall it following the directions in Lab 0.

  5. Next, open the Preferences window:

    • On macOS, choose Preferences in the Python or Spyder menu.

    • On Windows, choose Preferences in the Tools menu.

  6. Inside the Preferences window, choose IPython console from the left-hand list of options.

  7. Next, click the Advanced Settings tab, and scroll down to the section labeled Prompts.

  8. In the box labeled Input prompt:, enter the following:

    >>>
    
  9. In the box labeled Output prompt:, enter the following:

    result:
    
  10. Next, choose Run from the left-hand list of options in the Preferences window.

  11. On some versions of Spyder, you will see a section labeled General settings in the Run window. If you do, click the box next to Remove all variables before execution.

    If you don’t see a section labeled General settings, you should see a section labeled Global presets. In that section, find the table for Configuration presets and select the first row of that table (the one for File extension py). Then click the pencil icon under the table, which should open another window. In that window, find the section labeled Advanced settings and click the box next to Remove all variables before execution. Then click the OK button to close the extra window.

  12. Click the OK button to close the Preferences window.

  13. Close Spyder.

  14. Restart Spyder. As needed, click on the tab for the IPython console at the bottom of the right-hand pane. You should now see a >>> prompt in the IPython console pane, as shown in the image below:

    Spyder with modified prompt

Last updated on May 15, 2025.