Cpython deployment for pyrevit

Hi pyrevit-eers :wink: ,

recently i tried to make cpyhton script for pyrevit.
the scipt itself not that hard to configure just the:
#! python3

But for the python (paths) there is a bit more work:

  • having the right python version installed, aligned with pyrevit cpython-engin
  • setting PYTHONPATH environment variable for search paths for modules

After these the script runs fine for me and i can use pandas and numpy,…

So what’s the problem?
I’m not just creating a script to use myself but to be able to deploy it to other also.
The toolset i’m working on right now would also need to be deployed out side of the compay.

right now i just keep working in ironpython just to be “safe”.

What’s the best way to go about deploying pyrevit- tools (in general to others)?
Is this just a matter of providing files and a folder location where people should place the files after download?

Is there a way to deliver the correct version of python, set the correct PYTHONPATH via an installer?
i never made an installer myself but that’s a whole other case by itself.

Or would it be bettre to trigger a second script (cpython) from a ironpython script to run separtly outside of pyrevit to deal with additional modules?

Thx for the feedback, looking forward to what you great minds come up with :smiley:


Just to check but does / could pyrevit also install these Cpython engines?
Or would i need find a way to distibute this Cpython version alongside pyrevit and the extensions?

CPython 3.8.5 and 3.7.8 are installed with pyRevit. (…and what - 5 versions of IronPython).
Yes, individual packages or other CPython versions would have to be installed separately.

1 Like

Hi @aaronrumple ,

thx for your answer.
May i also conclude from it that the PYTHONPATH is also correclty set when installing pyrevit?

If so this would indeed solve any depencie on seperate installing, except for the extra python modules (via pip).

Yes. You can see that is you enter:

import sys

in python shell.