Depends on how weewxd is executed. If you (or the daemon init script) run the simple command
*weewxd /etc/weewx/weewx.conf* then the "shebang" is put into use. What is a shebang? If the first line of a file starts with the characters '#!', that's a shebang. It instructs the shell how to run the file. For weewx v3.x, it looks something like this: #!/usr/bin/env python It means, use the program "python" to run the file. Which version of python will depend on the defaults of your system. In your case, this is probably python 2.7. On the other hand, if you (or your daemon init script) start weewxd with an explicit python interpreter: *python3 weewxd /etc/weewx/weewx.conf* then that's the version of Python that gets used. The shebang does not come into play. Personally, this is the approach I use, because I always know what version of Python I am getting. Hope this helps. -tk On Thu, Jun 4, 2020 at 12:28 PM WindnFog <[email protected]> wrote: > That worked, Neville: > > python --version > Python 3.7.3 > > However, weewx still grabs python 2.7 . . . perhaps it's a bit too early > (new Raspberry Pi O/S and a new weewx version 4.1.1 for someone at my level > of expertise to monkey around with this yet. It's working, and while I > have a "just made" backup on a separate SD card, there seem to be a lot of > threads discussing this. I don't run anything but weewx on the Pi (i.e. no > other python scripts), but experience has taught me not to change too many > things at the same time. I suspect this is more related to the O/S that's > only a week or so old as opposed to weewx. 2.7 seems to be working OK. I > don't understand why weewx is not picking up 3.7.3, but there's no rush. > > Paul VE1DX > > https://www.ve1dx.net > <https://www.google.com/url?q=https%3A%2F%2Fwww.ve1dx.net&sa=D&sntz=1&usg=AFQjCNHfiLypr9COL3G4nZH4lD2_TNTPDQ> > > On Wednesday, June 3, 2020 at 7:55:16 PM UTC-3, Neville Davis wrote: >> >> Read this >> >> https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux >> >> if you use the alternative option it is system-wide. This is the >> procedure I followed. But is it needed......I did it just to be current it >> only caused minor problems for me but no issues with operational python >> scripts I had >> >> Neville >> >> On Thursday, June 4, 2020 at 8:30:05 AM UTC+10, WindnFog wrote: >>> >>> Thanks, Neville. It's using Python 2.7.16. How do I switch the default >>> to Python 3, and of I do, is that likely to cause any problems? My guess >>> is no, but "if it ain't broke, don't fix it" might apply here. >>> >>> - Paul VE1DX >>> >>> https://www.ve1dx.net >>> <https://www.google.com/url?q=https%3A%2F%2Fwww.ve1dx.net&sa=D&sntz=1&usg=AFQjCNHfiLypr9COL3G4nZH4lD2_TNTPDQ> >>> >>> On Wednesday, June 3, 2020 at 10:24:20 AM UTC-3, WindnFog wrote: >>>> >>>> I updated my Pi 4 to Raspberry Pi OS and weewx to version 4.1.1. >>>> Everything seems A-OK. Great job, fellows! >>>> >>>> To move entirely into the 21st century, I want to start using python 3 >>>> (already installed) instead of python 2.7. Where do I find the >>>> documentation to make the switch? Any "gotchas" I of which I need to be >>>> aware? >>>> >>>> - Paul VE1DX >>>> >>>> https://www.ve1dx.net >>>> >>> -- > 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/7e72ef46-3368-4f26-ad42-ac3cc89c92aao%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/7e72ef46-3368-4f26-ad42-ac3cc89c92aao%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 on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEA895nV6ZprVtOd4ne4Ofc1iDNCa5n5AZYNnhopX019QQ%40mail.gmail.com.
