我有一个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
?
答案 0 :(得分:0)
由于OPCUA-Client
与Python2.7不兼容,所以我不得不使用Python3安装它。
sudo pip3 install cryptography
sudo pip3 install opcua-client
sudo apt-get install python3-pyqt5
感谢@eyllanesc