pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.28k stars 332 forks source link

'No module named pyevent' #1502

Closed Rhino1093 closed 2 years ago

Rhino1093 commented 2 years ago

I'm working on running some code inside of the python shell but I keep getting this error message and can't seem to solve it. Whenever I run the code I have (and I'm new at this so explain it to me like I'm 5), I get the error message, "Exception : IronPython.Runtime.Exceptions.ImportException: No module named pyevent". The whole error message is below.

From my google searching I found that I'm supposed to install padas inside of my python environment but I have no idea how to do this (like I said, I'm new and learning).

image

Desktop:

eirannejad commented 2 years ago

Add the path of site-packages directory (inside pyRevit's installed folder) to your RPS

onomou commented 1 year ago

In case anyone else comes across this like I did, this will do what @eirannejad said:

import sys
sys.path.append(r'C:\Users\<username>\AppData\Roaming\pyRevit-Master\pyrevitlib')
sys.path.append(r'C:\Users\<username>\AppData\Roaming\pyRevit-Master\site-packages')
from pyrevit import forms

Just replace <username> and paste into RevitPythonShell, provided pyRevit is installed in the default location.