Normally PyInstaller works fine for me but i saw a problem using the python-module pycountry.
I tried this very simple code: import pycountry land="DE" country = pycountry.countries.get (alpha_2=land) print(country.name) Compiled it with pyinstaller: pyinstaller --onefile xyz.py But i want to execute the compiled exe i get this error: Traceback (most recent call last): File "temp2.py", line 1, in <module> import pycountry File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "c:\users\polzi\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module exec(bytecode, module.__dict__) File "site-packages\pycountry\__init__.py", line 12, in <module> File "site-packages\pkg_resources\__init__.py", line 481, in get_distribution File "site-packages\pkg_resources\__init__.py", line 357, in get_provider File "site-packages\pkg_resources\__init__.py", line 900, in require File "site-packages\pkg_resources\__init__.py", line 786, in resolve pkg_resources.DistributionNotFound: The 'pycountry' distribution was not found and is required by the application [45548] Failed to execute script temp2 -- 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/0cb1840e-70fc-4954-871c-acd57ba0d43fn%40googlegroups.com.
