
WinPython_xxx_PyQt5.exe)。C:\WinPython)。打开 WinPython 的命令行工具:
WinPython Command Prompt.exe 并运行。使用 pip 安装 opcua-client:
pip install opcua-client
安装完成后,opcua-client.exe 会被放置在 WinPython 的 Scripts 目录中。
默认路径为:
YOUR_INSTALL_PATH\Python\PythonXX\Scripts\opcua-client.exe
例如:
C:\WinPython\Python-3.11\Scripts\opcua-client.exe
在 WinPython 的命令行工具中,直接运行:
opcua-client
如果提示找不到命令,可以使用完整路径运行:
C:\WinPython\Python-3.11\Scripts\opcua-client.exe
在 WinPython 的命令行工具中,运行以下命令:
pip install opcua-client --upgrade
为了方便直接运行 opcua-client,可以将 WinPython 的 Scripts 目录添加到系统的 PATH 环境变量中。
右键点击“此电脑”或“我的电脑”,选择“属性”。
点击“高级系统设置”。
在“系统属性”窗口中,点击“环境变量”。
在“系统变量”部分,找到并选择 Path,然后点击“编辑”。
点击“新建”,然后输入 WinPython 的 Scripts 路径,例如:
C:\WinPython\Python-3.11\Scripts
点击“确定”保存更改。
pip 安装 opcua-client。opcua-client.exe。Scripts 目录添加到系统 PATH。按照以上步骤操作即可成功安装并运行 opcua-client。如果遇到问题,请随时告诉我!