Numpy C-extension failed

Hi to everyone :slight_smile:

I am trying to run a PyRevit script and I want to use pandas.

I added the #! python3 at the start of the script and then added the following

import sys


import pandas as pd

However, the pyrevit plugin gives me this error:

I am not expert in programming so probably I am messing with something trivial, but I don’t know how to get out of it. :frowning: I hope someone could help me!


Hi @Candal,
Pyrevit does support python 3 up to a point but it’s implementation does not allow much/enough to get numpy or pandas to work and behave reliably.
Next version should work better.
One alternative is to use the subprocess module to execute you code outside of pyrevit/Revit and report back. But if you are new to coding, this may be a long shot.

Hi Jean-Marc thank you for your response. The main developer of the script (a Ph.D. student I am co-tutoring) has already tried with subprocesses and it worked for pandas, but we were having problems with other libraries. In any case, I was curious about implementing the Cpython approach because I would be more concise.

Thank you for your precious feedback however :slight_smile: I will check for the next version about it.