Error on installing dash 2.17.0

Hi team,
thanks for releasing new version of dash 2.17.0

After having it installed, upon running my python dash app, I get this error:
from importlib_metadata import version as _get_distribution_version
ModuleNotFoundError: No module named ‘importlib_metadata’

any thoughts?

Thanks

I haven’t seen that error, could you provide any more information?

sure, I am using Python 3.9.

this is where the error comes from:

when I change the code to the below, it works perfectly:

try:
   from importlib.metadata import version as _get_distribution_version
except ImportError:
   from importlib_metadata import version as _get_distribution_version

I set up a fresh python 3.9 virtual environment, did pip install dash==2.17.0 and let pip install all the latest dependencies automatically. I opened a small sample app, but the error does not appear.

I have version 7.1.0 of importlib_metadata installed in my virtual environment. What version are you using? Perhaps it is outdated. If so, perhaps a minimum version has to be set up for importlib_metadata.

thanks. Upgrading importlib-metadata to your version did the trick

Just for my curiousity, what version of importlib_metadata were you running? If I look at the history of the library I see that version has always been present in the library. Seems very strange that it would cause an error on your system?

Edit: Or were you just missing the package as a whole?

I wasn’t missing it, and you’re correct, it shouldn’t throw error, but your solution of upgrading to a newer version helped here