Newbie question about CPython

Hello all. I’m the IT manager of a small BIM firm and I was requested to setup pyRevit. Actually the installation went like a charm but I’m a little confused about using some standard third party libraries in the CPython used by pyRevit.
So, first question: pyRevit uses its version of CPython? If yes what version is it? If no, I need only to add the python executable path to PYTHONPATH?

How may I add numpy or other libraries with pip?



Hi and welcome,

  • you can see all engines available here pyRevit/bin/engines at master · pyrevitlabs/pyRevit · GitHub
    as of today, there are the 3.78 adn 3.85 cpython engines available
    That said, pyRevit is mostly IronPython friendly. You can get cpython to work up to a point but usually, users resort to a workaround running cpython code using the subprocess module (letting pyRevit do its regular things in Ironpython and execute cpython specific code outside of pyRevit)
    The cpython integration is not fully operational and can be really tedious to debug.

  • to strictly answer your second question: pip install numpy :smile:

:point_up_2: what I am suggesting is :point_up_2:

  • to get a cpython version installed
  • install numpy with pip
  • get pyrevit installed
  • create whatever tools you need for Revit and call the piece of code that requires numpy externally using the subprocess module

I hope that will help you get going

1 Like