ModuleNotFoundError:没有名为“paho”的模块;
我正在尝试通过 MQTT 协议与我的树莓派和我的 PC Windows 连接。我有一个无法在 PC 上解决的问题 - 我无法导入已安装到程序中的库:
import paho.mqtt.client as mqtt
导致错误
ModuleNotFoundError: No名为“paho”的模块
该主题已在此处发布(导入错误:找不到 paho.mqtt.client),但解决方案不起作用为我。
我在 python 文件夹中看到它:
C:\Users\mhucl\AppData\Local\Programs\Python\Python310\Lib\site-packages\paho\mqtt\client
我在 pip 列表中看到它。但程序找不到它。你知道问题可能出在哪里吗?我使用Python版本3.10.3。我也在不同的电脑上尝试过,结果相同。我遵循了 youtube、论坛上的所有解决方案,但什么也没做。非常感谢。
如果有人想查看以下屏幕截图:
https://uschovna.cz/zasilka/WLUWM5TNP7HP7GDG- XKP/UCKZFIZHCI
I am trying to make connection with my raspberry Pi and my PC windows through MQTT protocol. And I have a problem I cant solve on my PC - I can t import library that I have installed to my program:
import paho.mqtt.client as mqtt
Results in the error
ModuleNotFoundError: No module named 'paho'
The topic was already issued here (Import Error: paho.mqtt.client not found), but solution doesnt work for me.
I see it in the python folder:
C:\Users\mhucl\AppData\Local\Programs\Python\Python310\Lib\site-packages\paho\mqtt\client
I see it in the pip list. But the program can t find it. Do you know where could be the problem? I use python version 3.10.3. I tried it on different PC aswell and the same result. I followed all solutions on youtube, forums and nothing. Thank you very much.
Here are screenshots if someone would like to see:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
https://pypi.org/project/paho-mqtt/
我解决了我的错误使用这个命令
https://pypi.org/project/paho-mqtt/
I solved my error by using this command