Presumably pycountry uses pkg_resources.get_distribution("pycountry")
somewhere to access its own metadata (usually to set a __version__
attribute). But PyInstaller doesn’t collect that by default. To include it
you need to use the spec file. It looks like your code is named temp2.py so
your spec file will be called temp2.spec. Open temp2.spec (it’s just a
Python script so you can use your Python editor). Then put the following at
the top:
from PyInstaller.utils.hooks import copy_metadata
And in the a = Analysis(...) section change:
datas = [],
to
datas = copy_metadata("pycountry"),
Then rebuild using:
PyInstaller --clean temp2.spec
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyinstaller/acfe8a7f-efb8-4e46-8ace-2c4a722e0d01n%40googlegroups.com.