[Fixed]-Widget tweaks error ModuleNotFoundError: No module named 'widget_tweaks' with Django forms

29👍

Try to install with pip3:

pip3 install django-widget-tweaks 

5👍

I had this same problem and it was killing me!

(for me) The problem was that I was working in an virtural env in PyCharm) but I have a global python as well. From my command line I was running manage.py runserver, the problem being that my global python doesn’t have the widget-tweaks library installed. ( I didn’t realize I wasn’t running from the venv)

If you’re like me the solution is make sure you’re in the right environment,

from PyCharm I did tools -> run manage.py task -> runserver

and it worked…

1👍

I got this since I added 'widget_tweaks', above the started apps.
You need to add it under the started apps, you can add pip installed like this INSTALLED_APPS += [ 'widget_tweaks', ] under INSTALLED_APPS.
Only add pip installed apps in INSTALLED_APPS += [] and started apps in INSTALLED_APPS = [].

Or you can just add the pip installed apps bellow the started apps. Like this:

Settings.py only showing INSTALLED_APPS

...
INSTALLED_APPS = [ 
    
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'PupsToPet.apps.PupstopetConfig',
    ...
     
    # Started apps first
    'app1',
    'app2',
    ...

    # pip installed at the bottom
    'widget_tweaks',
    ...
    
]
...

0👍

Ahh this is working for me look when write
python -m pip install Pillow
this problem solved for me

0👍

My problem was resolved after upgrading my pip version from 21.0.1 to 21.1.1 using pip install --upgrade pip

👤Yeboah

Leave a comment