Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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:

https://uschovna.cz/zasilka/WLUWM5TNP7HP7GDG-XKP/UCKZFIZHCI

python --version ? pip --version ? python -c "import sys; print(sys.path)" ? Is C:\Users\mhucl\AppData\Local\Programs\Python\Python310\Lib\site-packages in the path? phd Mar 22, 2022 at 0:34 I think I got it. I didn t realize that spyder IDE has different python library. So I copy paste the paho library from python to the spyder folder. Thank you very much. Matouš Hucl Mar 22, 2022 at 13:26

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .