diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 38d7ae8d93..a20fb793cd 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -19,9 +19,14 @@ import string import shutil import sys import importlib -from importlib import metadata from datetime import datetime +try: + from importlib import metadata +except: + import importlib_metadata as metadata + + import moneyed import yaml diff --git a/requirements.txt b/requirements.txt index b9f1dfd692..155cd49e14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,6 +27,7 @@ django-weasyprint==1.0.1 # django weasyprint integration djangorestframework==3.12.4 # DRF framework flake8==3.8.3 # PEP checking gunicorn>=20.1.0 # Gunicorn web server +importlib_metadata # Backport for importlib.metadata inventree # Install the latest version of the InvenTree API python library pep8-naming==0.11.1 # PEP naming convention extension pillow==8.3.2 # Image manipulation