django使用captcha报错:No module named 'captcha'

在django虚拟环境安装了captcha

pip install django-simple-captcha

在settings.py里进行了注册:
django使用captcha报错:No module named 'captcha'
在urls.py里也增加了对应网址:
django使用captcha报错:No module named 'captcha'
在models.py里导入和在表单中使用都未报错:
django使用captcha报错:No module named 'captcha'

class UserForm(forms.Form):
    username = forms.CharField(label="用户名", max_length=32, widget=forms.TextInput(attrs={'class': 'form-control'}))
    password = forms.CharField(label="密码", max_length=64, widget=forms.PasswordInput(attrs={'class': 'form-control'}))
    captcha = CaptchaField(label='验证码')

在html文件中添加验证:
django使用captcha报错:No module named 'captcha'
做完这些进行运行时,代码报错:
ModuleNotFoundError: No module named ‘captcha’

讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!