Forums

Django-tailwind gives ModuleNotFoundError

So, i am using the django-tailwind integration and i followed this guide Django-Tailwind On my local machine eveything works fine, but when i cloned the repo on here, i got

Error running WSGI application
ModuleNotFoundError: No module named 'tailwind'
   File "/var/www/keshavwritescode_pythonanywhere_com_wsgi.py", line 16, in <module>
     application = get_wsgi_application()

   File "/usr/local/lib/python3.13/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
     django.setup(set_prefix=False)
     ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^

   File "/usr/local/lib/python3.13/site-packages/django/__init__.py", line 24, in setup
     apps.populate(settings.INSTALLED_APPS)
     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^

   File "/usr/local/lib/python3.13/site-packages/django/apps/registry.py", line 91, in populate
     app_config = AppConfig.create(entry)

   File "/usr/local/lib/python3.13/site-packages/django/apps/config.py", line 193, in create
     import_module(entry)
     ~~~~~~~~~~~~~^^^^^^^

to setup the repo, i ran

python manage.py tailwind install
python manage.py tailwind build

it created the static files in project_root/staticfiles/

You need to install the modules you want to use. See https://help.pythonanywhere.com/pages/InstallingNewModules/

I have already installed the django-tailwind module on the virtual environment

If that was true, you would not be getting that error message.

10:05 ~ $ workon .venv (.venv) 10:09 ~ $ pip install django-tailwind Looking in links: /usr/share/pip-wheels Requirement already satisfied: django-tailwind in ./.virtualenvs/.venv/lib/python3.13/site-packages (4.2.0) Requirement already satisfied: django>=4.2.20 in ./.virtualenvs/.venv/lib/python3.13/site-packages (from django-tailwind) (5.2.4) Requirement already satisfied: asgiref>=3.8.1 in ./.virtualenvs/.venv/lib/python3.13/site-packages (from django>=4.2.20->django-tailwind) (3.9.1) Requirement already satisfied: sqlparse>=0.3.1 in ./.virtualenvs/.venv/lib/python3.13/site-packages (from django>=4.2.20->django-tailwind) (0.5.3)

i think its installed

Ohh seems like i forgot to set my environment path in the web app, settings. Thanks for your efforts i appriciate it