openopc icon indicating copy to clipboard operation
openopc copied to clipboard

NameError: name 'pythoncom' is not defined

Open baoliwen929 opened this issue 7 years ago • 2 comments

PlatForm : Windows 7 X64 , Python version : 3.7 when I use : import OpenOPC opc = OpenOPC.client() Pycharm raise an error "NameError: name 'pythoncom' is not defined".

baoliwen929 avatar Oct 21 '18 04:10 baoliwen929

Regarding to https://stackoverflow.com/questions/4145079/importerror-no-module-named-pythoncom you need to either install ActivePython or install the missed module separately from git

ya-mouse avatar Oct 24 '18 17:10 ya-mouse

OpenOPC seems to only work for x86 python. If you don't have it, you should install it and run the code from it. Then you should :

  • Install pywin32.
  • Copy the files from pywin32_system32 path to win32

joaoemilioml avatar Nov 29 '18 17:11 joaoemilioml