4

I've been looking everywhere on the PyInstaller documentation and on search engines but I cannot figure this out:

When I build my .exe file, right-click and go in Details, the Product Version Number field is empty.

What do I need to do to populate this field?

LightCC
  • 9,804
  • 5
  • 52
  • 92
rmercier
  • 155
  • 1
  • 10

1 Answers1

2

You need to create a version file. See the discussion In this Q&A on what a version file is and how to create it, per the comment from M. R.

However, note that this is a very OS-dependent way of managing versioning. If you want to setup your scripts into a Python Package (i.e. one that can be installed with pip), consider using metadata from the setuptools package to handle your versioning. See the Python Packaging Docs and the Python Packaging Tutorial for more details.

However, this will not put the metadata into a format that can be accessed the way you requested. One could meld the two approaches and have the OS-specific version file use the setuptools package metadata as its source, since it is just a python file.

LightCC
  • 9,804
  • 5
  • 52
  • 92