You're going to have to describe with 'effectively wiped' means.
A weewx venv installation is not consistent in where it pins things to a
specific python version vs. where it relies on the os default python
version (perhaps a bug). Long answer follows, but there might be a quick
fix...
Background:
- bookworm uses python3.11 so your original venv expected python3.11 for
everything under the hood, as well as its systemd service files
- Unfortunately bookworm => trixie changes your system python version
from 3.11 to 3.13
- so you've created a mismatch between the os python (new) and the weewx
configuration that still expects the older 3.11 version of python
- and weewx being inconsistent in where it relies on the os python
version is what you are likely running into
Looking in weewx-venv/bin:
lrwxrwxrwx 1 root root 7 Sep 1 17:14 python -> python3
lrwxrwxrwx 1 root root 16 Sep 1 17:14 python3 -> /usr/bin/python3
lrwxrwxrwx 1 root root 7 Sep 1 17:14 python3.11 -> python3
But the /etc/systemd/system weewx service files (there are three) contain:
ExecStart=/home/pi/weewx-venv/bin/python3 \
/home/pi/weewx-venv/lib/python3.11/site-packages/weewxd.py \
/home/pi/weewx-data/weewx.conf
So when you walk the symlinks the ExecStart is using the 'os' python
version not the 'venv' python version. That (to me) is a bug.
- weewx-venv/bin/python3 points to /usr/bin/python3 (the os version)
- when it should point to /usr/bin/python3.11 (the specific version the
venv was created under)
A quick fix is to change one symlink to make things consistently point to
the original 3.11 python still present (but not the default) of your os:
- deactivate the venv
- remove the weewx-bin/python3 symlink
- add a new symlink pointing it to /usr/bin/python3.11
- activate the venv
- run "python3 --version" and you'll see it points to the original 3.11
- so everything will be consistently pointing to the original 3.11
version
I'm thinking this might be a weewx bug - the symlink in the venv should
point to the specific python version the venv was created in, once you read
through all the symlinks. If apps are going to set up a venv to be immune
from the os default python version changing, they need to do so
consistently to effectively pin themselves end-to-end to a specific version
of python.
On Monday, September 1, 2025 at 12:54:44 AM UTC-7 Graham Eddy wrote:
> i just did an in situ upgrade from bookworm to trixie (edit sources.list,
> update, dist-upgrade) and hit a snag:
> my old ~weewx/venv had been effectively wiped, so i had to reinstall
> weewx5 (i use pip method) plus my own private modules. it also needed
> module ’six’ reinstalled, which i thought would have been picked up in
> dependencies but…
> smooth sailing apart from that.
> cheers
> *⊣GE⊢*
>
>
--
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/2f4d17ea-e93a-455a-a72c-873bdee67fcdn%40googlegroups.com.