You're probably overthinking this one, but I'd suggest you avoid using pip or pip3 unless absolutely necessary. My recollection is that modern ubuntu/debian/raspbian have everything you need available in packages nowadays. Using pip should be pretty rarely needed.
apt-get install python3-paho-mqtt A clean ubuntu 2004 installs it to /usr/lib/python3/dist-packages if you use apt, so you 'likely' used pip3 originally. FWIW - if you install with apt and do a dist-upgrade, it doesn't delete anything that I can tell. My paho stuff was still there. But you're overthinking this one for sure. Just add the package it wants, -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/4c2decdc-8046-4dbb-99e3-bcefe20c5eb3n%40googlegroups.com.
