在Linux上安装OPC / UA客户端

时间:2017-09-09 11:07:06

标签: python linux qt

我有一个Raspberry Pi 3,我正在尝试连接OPC UA Server。为此,我指的是OPCUA-Client GUI。我使用sudo pip install opcua-client安装了它,但它显示的错误为pyqt5.qtcore

我使用sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools安装了qt。但它仍然显示以下错误:

  Traceback (most recent call last):   File "/usr/local/bin/opcua-client", line 7, in <module>
    from uaclient.mainwindow import main   File "/usr/local/lib/python2.7/dist-packages/uaclient/mainwindow.py", line 9, in <module>
    from PyQt5.QtCore import pyqtSignal, QTimer, Qt, QObject, QSettings, QModelIndex, QMimeData, QCoreApplication ImportError: No module named PyQt5.QtCore`

如何安装PyQt5.Qtcore以运行opcua-client

1 个答案:

答案 0 :(得分:0)

由于OPCUA-Client与Python2.7不兼容,所以我不得不使用Python3安装它。

sudo pip3 install cryptography

sudo pip3 install opcua-client

sudo apt-get install python3-pyqt5

感谢@eyllanesc