Python active_directory module- no module named "adsi"

1.6k Views Asked by At

I'm trying to import the active_directory module to my python code, but having a problem where it's telling me there is no module called adsi.

>>> import active_directory
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python33\lib\site-packages\active_directory.py", line 105, in <module
>
    from win32com import adsi
  File "C:\Python33\lib\site-packages\win32comext\adsi\__init__.py", line 25, in
 <module>
    from adsi import *
ImportError: No module named 'adsi'

I have the latest pywin32 (219) installed, but still getting this error. Does anybody know why this is?

Thanks a bunch!!

1

There are 1 best solutions below

2
On BEST ANSWER

Managed to sort this by changing:

from adsi import *

in C:\Python33\lib\site-packages\win32comext\adsi__init__py to

from .adsi import *

I'm now able to import active_directory just fine.