How to Run Python in Excel on a Mac

Matt Housley

If you use a Mac, you may have suffered FOMO on encountering the brouhaha surrounding the beta release of Python in Microsoft Excel — as for the time being, this feature is only available on Windows. In this blog post, I’ll show you how to set up a Windows virtual machine on a Mac so you can run ‘=PY()’ to your heart’s content!

Caveat: This is a less-than-ideal, short-term workaround if you’d rather not wait for native support for Python in Excel on a Mac.

System Requirements

To evaluate the pre-release version of Python in Excel, I used an M1 Apple Silicon MacBook Pro (2020) with 8 gigabytes of memory. With this quantity of system memory, I was able to run Excel on Windows just fine, though I noticed that my system would get a little sluggish if I had too many other memory-hungry applications open. If you’re on an Apple Silicon Mac, you have at least 8 gigabytes of memory, so you’ll have adequate resources to follow this tutorial. If you’re running an Intel Mac, the same basic steps should work, but your mileage may vary depending on the age and configuration of your system.

Installing Parallels

The first step to get Windows up and running is to install Parallels.

You can go to parallels.com and click on the Free Trial link to test the software for up to 14 days before committing to a paid subscription. On the next page, click on the Download Trial button to download the installer. Run the installer from your downloads folder.

Once you kick off the install process, the installer will fully download Parallels Desktop and install it.

Next, we need to download Windows and install it in a Parallels virtual machine. As of February 2023, Microsoft officially supports Windows on Apple Silicon. In practical terms, this means that Parallels can download and install Windows 11 for us.

Once the installation process finishes, you’ll be presented with a Windows desktop, including the taskbar and start button.

Clicking on the start button will bring up the start menu, including the Microsoft Office icon.

Next, we need to install Excel. Python support is available through the Beta Channel of the Microsoft 365 Insider Program. How you install Excel and set the correct channel depends on your situation. If you’re using a corporate Office 365 license, you should talk to your IT department about installing Excel with Insider access. If you plan on using a personal license, you can click on the Office icon in the start menu to install Excel. You’ll also need to apply for the Microsoft Insider Program and manually update Excel through the Beta Channel. Basic instructions are available through this guide.

Next Steps

Now you can explore a new world of data analysis in Excel on your Mac. Create advanced visualizations through libraries such as Matplotlib, perform deep statistical analysis, and easily share your work with your team.

Now that you’re up and running, try working through a few of our Python in Excel tutorials.

Talk to an Expert

Talk to one of our financial services and banking industry experts to find solutions for your AI journey.

Talk to an Expert