Nov. 16, 2022

Fixing _SixMetaPathImporter.find_spec() not found warnings in Python 3.10

I am helping a client upgrade their Django application to Python 3.10 and we encountered this mysterious warning when running the app on the new Python version:

<frozen importlib._bootstrap>:914: ImportWarning: _SixMetaPathImporter.find_spec() not found; falling back to find_module()

To make matters worse, this warning doesn’t only show up once, but more than 200 times when we run python manage.py runserver. It completely floods the console output 😱

A fair amount of googling revealed that the warnings are coming from the six library. Luckily, they patched the issue in version 1.16.0. We just have to make sure we are running the latest version!