b3 pip ephem check confusion

36 views
Skip to first unread message

Vince Skahan

unread,
May 27, 2023, 12:20:24 PM5/27/23
to weewx-development
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....

pi@pi4:~ $ pip3 list --verbose | grep wee
weewx         5.0.0b3   /home/pi/.local/lib/python3.9/site-packages pip


Guessing there's a ephem vs. pyephem error someplace under the hood in the b3 installer pieces...

Tom Keffer

unread,
May 27, 2023, 1:34:52 PM5/27/23
to Vince Skahan, weewx-development
The package name is now 'ephem', not 'pyephem'. For backwards compatibility, pyephem is a simple stub that has a sole dependency: ephem.

You can uninstall pyephem, and just use ephem.

WeeWX needs ephem 4.1 or later. V3.7 gives an error that seems to be related to old Python 2.7 compatibility issues. V4.0 will work, but give slightly different answers and won't pass the test suites.

-tk

--
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/ea355597-eded-49c4-b6c4-b4b9a83fa103n%40googlegroups.com.

Vince Skahan

unread,
May 27, 2023, 2:16:56 PM5/27/23
to weewx-development
Is there some way to put a pre-check routine somewhere about this changing of the packages ?  It's going to confuse the heck out of people.

Tom Keffer

unread,
May 27, 2023, 2:24:59 PM5/27/23
to Vince Skahan, weewx-development
Hey, this was an alpha version. Proceed with caution!

The final version will have a simple dependency: ephem.

Vince Skahan

unread,
May 27, 2023, 2:25:53 PM5/27/23
to weewx-development
Absolutely.  Thanks.
Reply all
Reply to author
Forward
0 new messages