解决:ModuleNotFoundError No module named 'widget_tweaks'

一:引言

1.在django项目中遇到了这样的问题:

ModuleNotFoundError: No module named 'widget_tweaks'

image-20200710132805484

2.但是用pip装get_tweaks的时候又报错了

image-20200710132850434

3.后来去百度了一下,原来get_tweaks是属于django的,全称是:django-widget-tweaks

二:解决方法1

1.在pycharm下列的Terminal输入下列代码

pip install django-widget-tweaks

三:解决方法2

1.单击pycharm右下角,打开Interpreter Settings

image-20200710133154171

2.点击Python Interpreter,点击:加号

image-20200710133300932

3.输入:django-widget-tweaks,点击下面的选项,然后点击:Install Package

image-20200710133432651

原文地址:https://www.cnblogs.com/xuexianqi/p/13278778.html