Replace package.__version__ in scripts with: >>> from importlib.metadata import version >>> version(' package') This works even if there is no __version__ attribute and is more informative.
Replace package.version in scripts with:
This works even if there is no version attribute and is more informative.