Home > Net >  Docker - ModuleNotFoundError: No module named 'drf-spectacular'
Docker - ModuleNotFoundError: No module named 'drf-spectacular'

Time:07-31

I'm trying to add drf_spectacular, but when I run container, I get this error: Error massage

drf_spectacular is aviable on installed python package in my container: Installed packages

requirements.txt

Django>=4.0.4,<4.1
djangorestframework>=3.13.1,<3.14
psycopg2>=2.8.6,<2.9
django-filter>=22.1,<22.2
drf-spectacular>=0.22.1,<0.23

CodePudding user response:

The module name is drf_spectacular, not drf-spectacular. See the installation docs: https://github.com/tfranzel/drf-spectacular#installation

CodePudding user response:

The module is named drf_spectacular, you have a dash there instead of an underscore.

  • Related