> - I have upgraded my Raspberry Pi to a model 4 with Raspian Buster. I
> now have Weewx 4 running under Python 3, all working perfectly (Davis
> Vantage Pro with USB).
> - I would like to use the above link * MQTT plugin with Weewx 4, and see
> it has a green compatibility tick next to its listing, saying it will work
> with Python 3.
> - Does this mean I need to install Pip (using sudo apt install
> python-pip) which I take it is Pip for Python 2, in order for it to work?
> Or will this plugin work with Pip3?
I don't use raspian, and you are really asking an OS python question.
I'm answering because I have edited that wiki page at times.
This isn't really about pip. The real requirement is that the python
modules listed have to be present in the version of python that you are
using to run weewx, so that when the mqtt module does an import
statement, they load. See mqtt.py, and notice
import paho.mqtt.client as mqtt
and then a few lines later, code looking for one of several json
implementations.
This definitely means that if you are using e.g. python 3.7 for weewx,
having a python 2.7 paho module installed is not useful.
So if you have prerequisites for weewx installed in some python3.X
version, and you used pip for that, you should run the version of pip
that will install to that same place.
Or, if you have other prerequisites installed via a packaging system,
then you can just install that packages for the python modules paho-mqtt
and python-json using that same packaging system.
On my weewx install (still running python 2.7), I have the following
pkgsrc packages installed. Of course, this is not directly applicable
because you said you are running Raspbian.
py27-paho-mqtt-1.4.0 MQTT version 3.1.1 client class
py27-cjson-1.2.1 Fast JSON encoder/decoder for Python
And you posted in exactly the right place.