Jul 6, 2024

How to add Python 3 packages to pyRevit? (pandas, numpy, openpyxl...)

Learn how to add more python3 packages to pyrevit in this lesson. It's all about installing these modules and providing the correct paths, but I will show you all the steps.

In this lesson you will learn how to install pandas, numpy, openpyxl and any other python 3 package to be used in pyRevit. The process is not complicated, but there are a few steps to follow.

Let's begin

pyRevit Docs

Firstly, I would recommend you to read pyRevit Dev Docs:

💡There are a few important points mentioned:

  • How to run scripts in python 3 -> #! python3

  • CPython scripts always read using UTF-8 encoding. No need for # -*- coding: utf-8 -*-

  • List of pyRevit packages

  • How to solve Interface Error Message " Duplicate type name within an assembly."

pyRevit python version

Now before we begin installing packages, let's check what python version is used by pyRevit.Create a simple button in pyrevit, and if you are completely new, check out this lesson.

Then add this code:

import sys
print("Python version:", sys.version)
print("Version info:", sys.version_info)

In my case I get the following:

You can also check what is the IronPython version if you remove #!python3

Install same python version (3.8.5 in my case)

Want to Learn More?

🔥 Amazing Revit API Resources!

Join Revit API

Newsletter Today!

Join Us!

which is already read by 6000+ people!

Get short Revit API Lessons and Tips directly in your mail!