Chapter 2. Development Environment

You probably can’t wait to learn the basics of Python but before we get there, you first need to set up your computer accordingly. To write VBA code or Power Queries, it’s enough to fire up Excel and open the VBA or Power Query editor, respectively. With Python, it’s a bit more work.

We will start this chapter by installing the Anaconda Python distribution. Besides installing Python, Anaconda will also give us access to the Anaconda Prompt and Jupyter notebooks, two essential tools that we will use throughout this book. The Anaconda Prompt is a special Command Prompt (Windows) or Terminal (macOS); it allows us to run Python scripts and other command line tools that we will meet in this book. Jupyter notebooks allow us to work with data, code, and charts in an interactive way, which makes them a serious competitor to Excel workbooks. After playing around with Jupyter notebooks, we will install Visual Studio Code (VS Code), a powerful text editor. VS Code works great for writing, running, and debugging Python scripts and comes with an integrated Terminal. Figure 2-1 summarizes what’s included in Anaconda and VS Code.

As this book is about Excel, I am focusing on Windows and macOS in this chapter. However, everything up to and including Part III runs on Linux as well. Let’s get started by installing Anaconda!

pyfe 0201
Figure 2-1. Development environment ...

Get Python for Excel now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.