如何修复 Python ModuleNotFoundError: No module named 'paho'
问题:
运行 Python 脚本时,你看到类似这样的错误消息
traceback.txt
Traceback (most recent call last):
File "test.py", line 2, in <module>
import paho.mqtt.client as mqtt
ModuleNotFoundError: No module named 'paho'解决方案
使用以下命令安装 paho-mqtt 包
install_paho.sh
pip install -U paho-mqttIf this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow