In a Debian package install, the shims weewxd and weectl are *shell scripts* that are normally installed into /usr/bin. The files weewxd.py and weectl.py are Python code and are normally installed in /usr/share/weewx. The shell scripts load the Python scripts.
Your instance /usr/local/bin/weectl seems to be a Python script that is trying to import the main module. That's the way the *pip install* works, not the Debian install. I suspect that you somehow got a pip install and a Debian package install scrambled together. You'll have to look around the usual places to figure out how to unscramble them. >From the limited information, that's all I can come up with. -tk On Wed, Jan 7, 2026 at 12:39 PM Greg <[email protected]> wrote: > Sorry, I didn't think it was a unusual setup. I used the installer apt in > Ubuntu 20,. "apt install weewx" I thought that was the standard way to > install? > I updated to Ubuntu 22 and then 24 today when I now get that error. It's > weewx version 5.2.0-1. I'm using a Ecowitt gateway, driver = > user.gw1000. It has been working fine for a while until the Ubuntu update. > It's Python 3.12.3. > Static IP for the server. > > "weectl diag" gives me an error: > > Traceback (most recent call last): > File "/usr/local/bin/weectl", line 5, in <module> > from weectl import main > ModuleNotFoundError: No module named 'weectl' > > > Thanks > > > On Wednesday, January 7, 2026 at 2:26:03 PM UTC-5 Vince Skahan wrote: > >> If you refuse to actually describe your very unusual setup, you're not >> going to get a lot of help here too quickly..... >> >> On Wednesday, January 7, 2026 at 11:18:27 AM UTC-8 Greg wrote: >> >>> >>> >>> I can run it on the command line "python3 /usr/share/weewx/weewxd.py" >>> >>> I guess it is a path issue. >>> >>> Seems like the Linux service calls: /usr/local/bin/weewxd to start the >>> service. >>> >>> Which is trying to do an import of main from weewxd ie line #5: "from >>> weewxd import main" >>> >>> I guess it can't find weewxd? >>> >>> Is there a better way to start it as a service? >>> >>> >>> >>> >>> >>> >>> >>> On Wednesday, January 7, 2026 at 1:51:57 PM UTC-5 Vince Skahan wrote: >>> >>>> Need much more info. >>>> >>>> >>>> https://github.com/vinceskahan/weewx-getting-started/blob/main/how-to-report-a-problem.md >>>> >>>> Quick guess is your very unusual path of /usr/local/bin is where to >>>> start looking. >>>> >>>> On Wednesday, January 7, 2026 at 10:47:02 AM UTC-8 Greg wrote: >>>> >>>>> Hi, I'm getting an error when the service starts after upgrading to >>>>> Ubuntu 24: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *Jan 07 11:25:33 htpctemp weewxd[32126]: File >>>>> "/usr/local/bin/weewxd", line 5, in <module>Jan 07 11:25:33 htpctemp >>>>> weewxd[32126]: from weewxd import mainJan 07 11:25:33 htpctemp >>>>> weewxd[32126]: ModuleNotFoundError: No module named 'weewxd'Jan 07 >>>>> 11:25:33 >>>>> htpctemp systemd[1]: weewx.service: Main process exited, code=exited, >>>>> status=1/FAILUREJan 07 11:25:33 htpctemp systemd[1]: weewx.service: Failed >>>>> with result 'exit-code'.* >>>>> >>>>> Any ideas? Did find anything searching via Google. >>>>> >>>>> Thanks, Greg >>>>> >>>> -- > 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 visit > https://groups.google.com/d/msgid/weewx-user/f757f702-5bba-4ac1-9e9a-df16877401cen%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/f757f702-5bba-4ac1-9e9a-df16877401cen%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 visit https://groups.google.com/d/msgid/weewx-user/CAPq0zECDp2d9Et-%3DHvsraaS1hhM5qTz8BanfRiOeueWBojwNEQ%40mail.gmail.com.
