Importing Pyrevit.forms to Revitpythonshell

Hi, I want to import pyrevit.forms as you see in picture below , but I faced with that error
anyone know that how can I fix it?

You’re in Python Shell which doesn’t see pyRevit.
Some steps required:
Import pyervit moduals to revit pythonshell - Tools - pyRevit Forums (

As an aside…
A better workflow is to go ahead and set up a testing extension. I have one extension deployed for the office and one set up for my testing and development that only I can load.

You can then open the script you are working on in VS Code and edit real time as you are testing. Just save in VS Code and hit the button in Revit. Toss in traceback and print statements as needed to help with debugging. When done - just copy all the files to the deployed extension.

Python Shell is ok for testing a few lines of code. But gets tedious with anything too complex. Especially when you start adding in a lot of UI like smart buttons.