Import Python Module

Hey, to start things out, could you give some more info, for example ;

  • What directory do you have when you enter “pip -V” in the console? This should be the same entered in PYTHONPATH in the system variables (explained below)
  • When executing your code in python, what version of python it’s using? code :

import sys
print(sys.version)

I’m seeing “IronPython” on the Traceback, it’s only possible using external modules with cpython in pyRevit, and if I’m not wrong, you should have the same version of python, using the latest one available for cpython would be 3.8.5. There’s some discussion in this forum and Autodesk Forum. There is a video by Ehsan Iran-Nejad here

And I encountered some problems concerning ADMIN authorization on my company’s PC, I tried using on my personal PC and it did the trick.

Best of luck!

1 Like