How can I get the version defined in setup.py (setuptools) in my package?
Interrogate version string of already-installed distribution To retrieve the version from inside your package at runtime (what your question appears to actually be asking), you can use: import pkg_resources # part of setuptools version = pkg_resources.require(“MyProject”)[0].version Store version string for use during install If you want to go the other way ’round (which appears to … Read more