0

Can I use pkg_resources to check the version of a package from a git repository?

When I use the code pkg_resources.require("git+https://github.com/example/example@a1b2c34#egg=example"), it fails to parse it.

Is there a better way to programmatically check the version of a package from a git repository to know whether it needs to be installed?

beauxq
  • 1,258
  • 1
  • 13
  • 22
  • No. See https://setuptools.pypa.io/en/latest/pkg_resources.html : "*The `pkg_resources` module distributed with `setuptools` provides an API for Python libraries to access their **resource files**…*" (Emphasize mine — *phd*). – phd May 21 '22 at 12:23
  • There are a bunch of "and" and "also" after that: and APIs for managing Python’s current “working set” of active packages – beauxq May 21 '22 at 16:01
  • https://stackoverflow.com/search?q=%5Bpip%5D+install+programmatically – phd May 21 '22 at 16:14

0 Answers0