v5 docs are a little behind on the web

176 views
Skip to first unread message

Vince Skahan

unread,
May 2, 2023, 10:56:31 PM5/2/23
to weewx-development
Just updated a28 to a29 (no issues on debian) and noticed the upgrade document is out of date for pip upgrades.  The command for updating skins is different now it seems.....can you push the current docs when you get a chance please ?

Tom Keffer

unread,
May 3, 2023, 7:26:21 AM5/3/23
to Vince Skahan, weewx-development
Done.

On Tue, May 2, 2023 at 7:56 PM Vince Skahan <vince...@gmail.com> wrote:
Just updated a28 to a29 (no issues on debian) and noticed the upgrade document is out of date for pip upgrades.  The command for updating skins is different now it seems.....can you push the current docs when you get a chance please ?

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/e8237568-ff9d-4e50-88dc-8b9805e867b2n%40googlegroups.com.

G Hammer

unread,
May 20, 2023, 10:31:20 PM5/20/23
to weewx-development
BTW- Under pip->Configure->Debian/Redhat/openSUSE
systemctl commands are missing 'weewx'

sudo systemctl stop
# Reconfigure to use your hardware:
weectl station reconfigure
# Remove the old database:
rm ~/weewx-data/archive/weewx.sdb
# Restart:
sudo systemctl start

matthew wall

unread,
May 20, 2023, 10:35:21 PM5/20/23
to weewx-development


> On 20 May 2023, at 22:31, G Hammer <gary....@gmail.com> wrote:
>
> BTW- Under pip->Configure->Debian/Redhat/openSUSE
> systemctl commands are missing 'weewx'

thanks for that! fixed at commit 742f3b98 (on the V5 branch)

Tom Keffer

unread,
Jun 3, 2023, 2:45:51 PM6/3/23
to weewx-development
In anticipation of the upcoming release, V5 docs can now be found at https://weewx.com/docs/5.0


On Tue, May 2, 2023 at 7:56 PM Vince Skahan <vince...@gmail.com> wrote:
Just updated a28 to a29 (no issues on debian) and noticed the upgrade document is out of date for pip upgrades.  The command for updating skins is different now it seems.....can you push the current docs when you get a chance please ?

--

Tom

unread,
Jun 3, 2023, 3:31:03 PM6/3/23
to weewx-development
On the upgrade tab the link pointed to in "If you are upgrading from an old setup.py installation, see the instructions Migrating setup.py installs to Version 5.0." is broken returning a 404 not found error.

Tom Keffer

unread,
Jun 3, 2023, 3:58:24 PM6/3/23
to Tom, weewx-development
Thanks for spotting that, Tom. Likely to be the first thing a user goes looking for!

Paul R Anderson

unread,
Jun 5, 2023, 7:42:42 AM6/5/23
to weewx-development
Installation on Debian-based systems using apt results in no extended Almanac data.
Install guide does not suggest you may wish to install python-ephem for python2 or python3-ephem for python3.
Also Previously there was an Almanac section in the Customization Guide which explained about extended Almanac data, however now there is no Almanac section in the Customization Guide

Thanks,
Paul


Tom Keffer

unread,
Jun 5, 2023, 7:47:50 AM6/5/23
to Paul R Anderson, weewx-development
The Debian guide has never mentioned installing ephem, although it probably should. 

The guide to the almanac is under the Cheetah generator documentation. You can find it here: https://weewx.com/docs/5.0/custom/cheetah/#almanac


G Hammer

unread,
Jun 5, 2023, 9:10:19 AM6/5/23
to weewx-development
The doc referenced still refer to pyephem
"If module pyephem has been installed"

Tom Keffer

unread,
Jun 5, 2023, 9:33:18 AM6/5/23
to G Hammer, weewx-development
On Mon, Jun 5, 2023 at 6:10 AM G Hammer <gary....@gmail.com> wrote:
The doc referenced still refer to pyephem
"If module pyephem has been installed"

Sorry. Not following. Are you referring to the name ("pyephem" vs "ephem")? Or, whether it's optional?

Paul R Anderson

unread,
Jun 5, 2023, 10:19:43 AM6/5/23
to weewx-development
rsyslog Deprecation in Debian 12
The release date of Debian 12 has been set to June 10, 2023
So Weewx V5 installs will be affected shortly. Seems wise to get ahead of it in the Docs.  
Please note I am trying not to rant about this change and simply start what it is and how it affects WeeWx.

In Debian 12, since the persistent journal from Systemd's journald has been activated and most log messages would end up being written twice on disk, the rsyslog package has been demoted from the Important to the Optional priority, which means it is no longer installed by default in a base Debian system.It is still possible to install the rsyslog package and it will work as usual.If you have upgraded from an older Debian release, and did not explicitly remove rsyslog you will not be affected by the change.

Under Debian 12
sudo tail -f /var/log/syslog
results in:
tail: cannot open '/var/log/syslog' for reading: No such file or directory
tail: no files remaining

In Debian 12 you can use the journalctl command to read log messages, which are stored in a binary format under /var/log/journal.
sudo journalctl -ef
-e --pager-end Immediately jump to the end in the pager
-f --follow Follow the journal
similar to running tail -f /var/log/syslog on previous versions of Debian.

Or a little cleaner, show only WeeWx data, assuming weewx running under systemd with a weewx.service file.
sudo journalctl -u weewx -f
-u --unit=UNIT Show logs from the specified unit
-f --follow Follow the journal

This Debian change breaks
User Guide
 Running WeeWX
  Monitoring WeeWX
   "To watch the log as it is generated, use the tail command with the -f option: tail -f /var/log/syslog"
   
And the Troubleshooting guide  
 "Did you look at the log file?"
  "sudo tail -f /var/log/syslog"

So to read last hour of WeeWwx log, assuming weewx running under systemd with a weewx.service file.

journalctl --since "1 hour ago" -u weewx
-u --unit=UNIT Show logs from the specified unit
Thanks,
Paul






On Sat, Jun 3, 2023 at 2:45 PM Tom Keffer <tke...@gmail.com> wrote:

Paul R Anderson

unread,
Jun 5, 2023, 10:53:07 AM6/5/23
to weewx-development
Debian 12, and possible other OS future releases follow PEP 668
This causes  refusal  to manually install packages with python interpreters, unless the --break-system-packages option is specified.

The Debian provided python3 interpreter packages (python3.11 and pypy3) are now marked as being externally-managed, following PEP-668. The version of python3-pip provided in Debian follows this, and will refuse to manually install packages on Debian's python interpreters, unless the --break-system-packages option is specified.

python3 -m pip install weewx --user
Results in

-----------------------------------------------------
"error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages."
---------------------------------------------


So to install with pip you need to do:
python3 -m pip install weewx --user --break-system-packages

And to upgrade:
python3 -m pip install weewx --upgrade --user --break-system-packages

Thanks,
Paul


On Sat, Jun 3, 2023 at 2:45 PM Tom Keffer <tke...@gmail.com> wrote:

Vince Skahan

unread,
Jun 5, 2023, 2:15:18 PM6/5/23
to weewx-development
I thought it was self-evident that you have to install rsyslog if your os variant doesn't do so by default.  Personally I'd leave the docs as-is rather than assuming everybody wants to give in to the systemd borg assimilating everything and making simple things that have worked for 30 years more complicated.

(that said - the journalctl stuff in your previous note would make a great wiki article if you were so inclined)

re: the PEP - ugh.  Rather than debian 'fixing' their python interpreter per the PEP so it's not an issue, they're going to throw that hideous error message.  That's a debian bug to me.

The --break-system-packages switch name python picked is a bit much too. Wow.

Not understanding why a non-privileged user installing something via pip with --user should throw 'any' warnings or errors, nor why a non-privileged user 'uninstalling' something they installed via pip with --user should throw any warnings.  That's a pip bug, or a debian bug.

That PEP is quite the read for sure.  Makes your head spin.

Tom Keffer

unread,
Jun 5, 2023, 5:48:36 PM6/5/23
to Paul R Anderson, weewx-development
Thanks, Paul. These are changes I wasn't aware of. We've recently decided to delay releasing V5 until late July, so that should give us time to catch up with these changes.

V5 pushes the idea of doing pip installs to the user space, but it looks like PEP 668 considers that to be externally managed as well. 

Alternatively, we can push to installing in a virtual environment, which is always a good idea, but a lot more complicated for a newbie, especially the part about activating the environment.

There's also pipx, but using it with extensions is really complicated!

I sure wish Python had a tool as elegant as npm.

Things to think about... All input welcome.

-tk

Paul R Anderson

unread,
Jun 6, 2023, 7:16:17 AM6/6/23
to weewx-development
Above my paygrade here, don't know what the issues are with pipx that makes it really complicated to use with extensions.
However noticed a older post from you explaining that:

"The virtual environment used by pipx (~/.local/pipx/venvs/weewx) is not aware of the pip user area ~/.local/lib/python3.9/site-packages. Instead, you have to install dependencies directly into the VE used by pipx"

I notice that pipx install has a --system-site-packages option that gives the virtual environment access to the system site-packages dir. Wonder if using that option could help with the extensions issue.

Thanks
Paul 
Reply all
Reply to author
Forward
0 new messages