How to see all packages available in Python in Excel
Want to share your content on python-bloggers? click here.
Python in Excel significantly enhances the capabilities of Excel users, enabling more sophisticated data analysis and visualization. However, it’s important to note that Python in Excel operates within a pre-configured, pre-installed environment. For a detailed explanation of how this setup functions, you can refer to my previous blog post on the subject:
During training sessions, a common question I encounter is how to view all the Python packages available in Excel, including their versions. To address this, here are a few methods you can use. Special thanks to fellow Excel MVP Owen Price for demonstrating how to print the environment details directly into the Excel grid.
1. Through Microsoft’s documentation
You can find a complete list of Python packages available in Excel on Microsoft’s website, which is helpful for sharing with those who don’t have Python in Excel yet. You can access it here: Open Source Libraries and Python in Excel.
Keep in mind that not all packages are automatically pre-loaded when you launch Python in Excel, but they are indeed installed! To learn more about the difference between installing and importing a package, check out this post:
2. Through the Python Editor
Another option, if you’re using Python in Excel, is to leverage the pip list
command along with some Jupyter cell magic. This approach will display a list of all the packages installed in the environment, along with their versions, directly in the editor console.
Knowing the version of each package is invaluable for troubleshooting issues, understanding a package’s API, and more.
3. Print the environment to the workbook grid
Lastly, you can display this information directly in the Excel workbook grid for easier access, thanks to Owen’s tip.
Under the hood, this code generates a list of tuples, each containing a package’s name and version. This format makes it easier to read and could potentially be used for other interesting tasks within Excel.
And that’s how you can view the available packages in Python for Excel! Be sure to review the list regularly and watch for updates, as new packages may be added over time.
What questions do you have about the Python in Excel environment? Which packages have you found useful, and which ones do you wish were included? Let me know in the comments!
The post How to see all packages available in Python in Excel first appeared on Stringfest Analytics.
Want to share your content on python-bloggers? click here.