0

Pardon me for my ignorance but I can't seem to get OpenOPC installed with Python 2.7 or 3.6.1. I found the github code but it does not appear to include an installer. So I attempted to install the version for 2.7 from here. I can make the OpenOPC server talk using the instructions but after copying all the files from the python 3 project into my python directory I can import OpenOPC but when I try opc = OpenOPC.client() I get a fault.

C:\>python
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenOPC
>>> opc = OpenOPC.client()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'OpenOPC' has no attribute 'client'
>>>
DanEEStar
  • 6,140
  • 6
  • 37
  • 52
Josie
  • 1
  • 1
  • 5
  • I see this discussion on SourceForge: https://sourceforge.net/p/openopc/discussion/709250/thread/bb4d19c9/?limit=25#a5b6 – Bill Bell Dec 19 '17 at 17:17
  • Honestly I would prefer to get this working in Python 3.x but it seems it might be easier to get it working on 2.7 instead. The problem on 2.7 is when I try to pip install anything it finds that in the Python 3.x installation and tells me it's already installed. The Python 2.7 error: 'NameError: global name 'pythoncom' is not defined' – Josie Dec 19 '17 at 17:36
  • I didn't venture too far in attempting this question because some of the libraries I use have no Py3.6 versions and the questions I've seen here on SO make Anaconda look like an unnecessary headache. – Bill Bell Dec 19 '17 at 18:13
  • Try [this project](https://github.com/ya-mouse/openopc) – danieltakeshi Sep 19 '18 at 19:44

1 Answers1

0

It works fine for me. I have installed OpenOPC through that package thanks to pip:

pip install OpenOPC-Python3x

Hope it helps.

Gnawavibes
  • 91
  • 8