This is so weird. I've backports.zoneinfo
listed in my #Python #pip requirements file, and it installed it just fine. Yet, I got errors (from #APScheduler) saying that I don't have it installed, despite being in the right environment/using the same interpreter and whatnot.
I investigated further and deduced that it's probably bcos for some reason... the module is listed/found on the system (container) as backports-zoneinfo
instead, not backports.zoneinfo
- hence, the pkg_resources.DistributionNotFound
error. For one, idek how this is happening cos I've another container that should be (for the most/relevant part at least) identical with the same requirements.txt file, environment and everything, and yet I've encountered no issues there and pkg_resources
did find it as backports.zoneinfo
(not with hyphen).
This is actually so freaking weird and wasting my time, big time.
---
edit:
As mentioned, this package should be identical in both containers (same version, same install location/method etc.) - even their names are identical in pip freeze
, it's only when investigating with pkg_resources
I've found where their names are different (again, no idea how this is the case - they're the same containers for the most part).
Noticing another difference tho between them:
the not ok container:
(venv) /base # ls -l /venv/lib/python3.8/site-packages/backports.zoneinfo-*.dist-info
ls: /venv/lib/python3.8/site-packages/backports.zoneinfo-*.dist-info: No such file or directory
the ok container:
(venv) /base # ls -l /venv/lib/python3.8/site-packages/backports.zoneinfo-*.dist-info
total 40
-rw-r--r-- 1 root root 4 Mar 10 17:36 INSTALLER
-rw-r--r-- 1 root root 592 Mar 10 17:36 LICENSE
-rw-r--r-- 1 root root 11357 Mar 10 17:36 LICENSE_APACHE
-rw-r--r-- 1 root root 4759 Mar 10 17:36 METADATA
-rw-r--r-- 1 root root 1896 Mar 10 17:36 RECORD
-rw-r--r-- 1 root root 0 Mar 10 17:36 REQUESTED
-rw-r--r-- 1 root root 102 Mar 10 17:36 WHEEL
-rw-r--r-- 1 root root 10 Mar 10 17:36 top_level.txt
---
edit:
oh nvm, it's not missing on the not ok container - just, affected by the somehow different name for wtv reason.
/venv/lib/python3.8/site-packages/backports_zoneinfo-0.2.1.dist-info:
total 40
-rw-r--r-- 1 root root 4 Mar 12 14:33 INSTALLER
-rw-r--r-- 1 root root 592 Mar 12 14:33 LICENSE
-rw-r--r-- 1 root root 11357 Mar 12 14:33 LICENSE_APACHE
-rw-r--r-- 1 root root 4759 Mar 12 14:33 METADATA
-rw-r--r-- 1 root root 1896 Mar 12 14:33 RECORD
-rw-r--r-- 1 root root 0 Mar 12 14:33 REQUESTED
-rw-r--r-- 1 root root 102 Mar 12 14:33 WHEEL
-rw-r--r-- 1 root root 10 Mar 12 14:33 top_level.txt