Trying to upgrade a30 to b3 but had some ephem version conflict craziness. It seems like your dependency checks are confused by pyephem vs ephem and their respective versions.
Apologies for not baselining the pip contents before hosing the system up with multiple times to get through an upgrade without pip complaining....
Here's a check a few attempts through the process when I started looking at what was there before trying the upgrade again...
pi@pi4:~ $ pip list --verbose |grep ephem
pyephem 3.7.7.0 /home/pi/.local/lib/python3.9/site-packages pip
pi@pi4:~ $ dpkg -l | grep ephem
Note the pip complaint in the next transcript. I have 'pyephem' 3.7.7.0 installed, but it complains that 'ephem' 4.1.4 is there. It wasn't there before I started, but the --upgrade seems to have installed it and 'then' complained. Note that it didn't uninstall pyephem.
pi@pi4:~ $ pip3 install weewx --upgrade --user
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: weewx in ./.local/lib/python3.9/site-packages (5.0.0b3)
Collecting weewx
Using cached https://www.piwheels.org/simple/weewx/weewx-5.0.0b3-py3-none-any.whl (3.2 MB)
Using cached https://www.piwheels.org/simple/weewx/weewx-5.0.0b2-py3-none-any.whl (3.2 MB)
Requirement already satisfied: configobj<6.0,>=5.0 in /usr/lib/python3/dist-packages (from weewx) (5.0.6)
Requirement already satisfied: six<2,>=1 in /usr/lib/python3/dist-packages (from weewx) (1.16.0)
Collecting ephem<5.0,>=4.1
Using cached https://www.piwheels.org/simple/ephem/ephem-4.1.4-cp39-cp39-linux_armv7l.whl (1.7 MB)
Requirement already satisfied: PyMySQL[rsa]<2.0,>=1.0 in ./.local/lib/python3.9/site-packages (from weewx) (1.0.3)
Requirement already satisfied: pyusb<2.0.0,>=1.0.2 in /usr/lib/python3/dist-packages (from weewx) (1.0.2)
Requirement already satisfied: Pillow>=5.2 in /usr/lib/python3/dist-packages (from weewx) (8.1.2)
Requirement already satisfied: CT3<4.0,>=3.1 in ./.local/lib/python3.9/site-packages (from weewx) (3.3.1)
Requirement already satisfied: pyserial<4.0,>=3.4 in /usr/lib/python3/dist-packages (from weewx) (3.5b0)
Requirement already satisfied: cryptography in ./.local/lib/python3.9/site-packages (from PyMySQL[rsa]<2.0,>=1.0->weewx) (40.0.1)
Requirement already satisfied: cffi>=1.12 in ./.local/lib/python3.9/site-packages (from cryptography->PyMySQL[rsa]<2.0,>=1.0->weewx) (1.15.1)
Requirement already satisfied: pycparser in ./.local/lib/python3.9/site-packages (from cffi>=1.12->cryptography->PyMySQL[rsa]<2.0,>=1.0->weewx) (2.21)
Installing collected packages: ephem
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pyephem 3.7.7.0 requires ephem==3.7.7.0, but you have ephem 4.1.4 which is incompatible.
Successfully installed ephem-4.1.4
So it added ephem 4.1.4....
pi@pi4:~ $ dpkg -l | grep ephem
pi@pi4:~ $ pip list --verbose |grep ephem
ephem 4.1.4 /home/pi/.local/lib/python3.9/site-packages pip
pyephem 3.7.7.0 /home/pi/.local/lib/python3.9/site-packages pip
So I then tried explicitly removing pyephem and ephem....
pi@pi4:~ $ pip uninstall ephem pyephem
Found existing installation: ephem 4.1.4
Uninstalling ephem-4.1.4:
Would remove:
/home/pi/.local/lib/python3.9/site-packages/ephem-4.1.4.dist-info/*
/home/pi/.local/lib/python3.9/site-packages/ephem/*
Proceed (y/n)? y
Successfully uninstalled ephem-4.1.4
Found existing installation: pyephem 3.7.7.0
Uninstalling pyephem-3.7.7.0:
Would remove:
/home/pi/.local/lib/python3.9/site-packages/pyephem-3.7.7.0.dist-info/*
Proceed (y/n)? y
Successfully uninstalled pyephem-3.7.7.0
Check all the ephem(ish) things are indeed gone
pi@pi4:~ $ pip list --verbose |grep ephem
And try again...
pi@pi4:~ $ pip3 install weewx --upgrade --user
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: weewx in ./.local/lib/python3.9/site-packages (5.0.0b3)
Collecting weewx
Using cached https://www.piwheels.org/simple/weewx/weewx-5.0.0b3-py3-none-any.whl (3.2 MB)
Using cached https://www.piwheels.org/simple/weewx/weewx-5.0.0b2-py3-none-any.whl (3.2 MB)
Requirement already satisfied: pyserial<4.0,>=3.4 in /usr/lib/python3/dist-packages (from weewx) (3.5b0)
Collecting ephem<5.0,>=4.1
Using cached https://www.piwheels.org/simple/ephem/ephem-4.1.4-cp39-cp39-linux_armv7l.whl (1.7 MB)
Requirement already satisfied: CT3<4.0,>=3.1 in ./.local/lib/python3.9/site-packages (from weewx) (3.3.1)
Requirement already satisfied: pyusb<2.0.0,>=1.0.2 in /usr/lib/python3/dist-packages (from weewx) (1.0.2)
Requirement already satisfied: Pillow>=5.2 in /usr/lib/python3/dist-packages (from weewx) (8.1.2)
Requirement already satisfied: six<2,>=1 in /usr/lib/python3/dist-packages (from weewx) (1.16.0)
Requirement already satisfied: configobj<6.0,>=5.0 in /usr/lib/python3/dist-packages (from weewx) (5.0.6)
Requirement already satisfied: PyMySQL[rsa]<2.0,>=1.0 in ./.local/lib/python3.9/site-packages (from weewx) (1.0.3)
Requirement already satisfied: cryptography in ./.local/lib/python3.9/site-packages (from PyMySQL[rsa]<2.0,>=1.0->weewx) (40.0.1)
Requirement already satisfied: cffi>=1.12 in ./.local/lib/python3.9/site-packages (from cryptography->PyMySQL[rsa]<2.0,>=1.0->weewx) (1.15.1)
Requirement already satisfied: pycparser in ./.local/lib/python3.9/site-packages (from cffi>=1.12->cryptography->PyMySQL[rsa]<2.0,>=1.0->weewx) (2.21)
Installing collected packages: ephem
Successfully installed ephem-4.1.4
And it put ephem=4.1.4 back into place, and didn't install pyephem 'or' ephem 3.7.7.0 which weewx seemed to want as a hard requirement...
pi@pi4:~ $ pip3 list --verbose | grep ephem
ephem 4.1.4 /home/pi/.local/lib/python3.9/site-packages pip
FWIW, it's possible weewx b3 was there all the time. I forgot to check while cycling through this a half dozen times....