# Error on importlib\_metadata using python dash 2.16.1 and Python 3.9

**URL:** <https://community.plotly.com/t/error-on-importlib-metadata-using-python-dash-2-16-1-and-python-3-9/82960>\
**Category:** Dash Python\
**Created:** [March 12, 2024, 1:29am UTC](https://community.plotly.com/t/error-on-importlib-metadata-using-python-dash-2-16-1-and-python-3-9/82960 "2024-03-12T01:29:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![231530353](https://avatars.discourse-cdn.com/v4/letter/2/ecae2f/32.png) [@231530353](https://community.plotly.com/u/231530353)\
**Post date:** [March 12, 2024, 1:29am UTC](https://community.plotly.com/t/error-on-importlib-metadata-using-python-dash-2-16-1-and-python-3-9/82960/1 "2024-03-12T01:29:48Z")

</div>

Hi,

I tried to upgrade Python Dash to 2.16.1 on Python 3.9… as I can see in the dash code: [dash/dash/dash.py at dev · plotly/dash · GitHub](https://github.com/plotly/dash/blob/dev/dash/dash.py#L23)  
dash uses importlib\_metadata, and that causes this error for my code:  
ModuleNotFoundError: No module named ‘importlib\_metadata’

but based on [importlib\_metadata 7.0.3.dev0+g913352a.d20240307 documentation](https://importlib-metadata.readthedocs.io/en/latest/) users are encouraged to use the Python standard library where suitable and fall back to this library for future compatibility, as follows:

try:  
from importlib.metadata import version as \_get\_distribution\_version  
except ImportError:  
from importlib\_metadata import version as \_get\_distribution\_version

any thoughts?
