Re: [weewx-user] Weewx changing from python2 to 3 errors

64 views
Skip to first unread message

Tom Keffer

unread,
Sep 14, 2020, 3:03:07 PM9/14/20
to weewx-user
Python 2 and Python 3 keep separate libraries. What this means is that if something is installed for Python 2, it will not be available for Python 3. You must re-install for Python 3.

If you review the install instructions for weewx-mqtt, you'll see that it tells you that for Python 3, you'll need:

sudo pip3 install paho-mqtt

This will install and make available a Python 3 version of paho-mqtt.

-tk




On Mon, Sep 14, 2020 at 10:29 AM Michael Sanphillipo <sanph...@gmail.com> wrote:
I get the following error after changing from python 2 to 3. I'm using Weewx 4.1.1 I thought it may have been MQTT so I installed the latest version from https://github.com/weewx/weewx/wiki/mqtt



Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__: Caught unrecoverable exception:
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****  No module named 'paho'
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****  Traceback (most recent call last):
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", line 148, in main
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 75, in __init__
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****      self.loadServices(config_dict)
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 138, in loadServices
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****      obj = weeutil.weeutil.get_object(svc)(self,config_dict)
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1093, in get_object
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****      mod = __import__(module)
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****    File "/usr/share/weewx/user/mqtt.py", line 100, in <module>
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****      import paho.mqtt.client as mqtt
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'paho'
Sep 14 13:05:23 raspberrypi weewx[12183] CRITICAL __main__:     ****  Exiting.

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/990fa7d9-f7ac-4516-96b2-8ef40a09f011n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages