Chapter 2. Development Environment
To write VBA code, it’s enough to launch Excel and open the VBA editor. To use a full Python installation, it’s a bit more work. If this book were only about Python in Excel (Part III) and xlwings Lite (Part V), we wouldn’t have to install anything locally. But using Python from Excel covers only one side of the story—we don’t want to miss out on the other side, which is using Excel from Python (Part IV and Part VI). Besides that, both Python in Excel and xlwings Lite have certain limitations that a full Python installation doesn’t have. This chapter will make you familiar with all the tools you need as a Python developer. We will start with a quick introduction to the Terminal, the most fundamental programming tool. We’ll continue with the installation of uv, a modern package manager, before using it to install Python itself. With Python installed, we will run our first code snippets in Jupyter notebooks and Visual Studio Code (VS Code): Jupyter notebooks allow us to work with data, code, and charts in an interactive way, which makes them a serious competitor to Excel workbooks. VS Code is a powerful text editor that works great for writing, running, and debugging Python code. As this book is about Excel, I am focusing on Windows and macOS in this chapter. Before anything else, let’s download the companion repository!
Companion Repository
To install Python and run the examples in this book, you first need to download the companion repository ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access