遇到问题
IDE为Pycharm,安装过captcha包,在settings中将‘captcha’注册到app列表里,然后再Terminal中进行迁移:
python manage.py migrate
结果报错:
ModuleNotFoundError: No module named 'captcha'
解决方法
在Anaconda中激活虚拟环境,cd到manage.py路径,再进行迁移即可成功
Operations to perform:
Apply all migrations: admin, auth, captcha, contenttypes, login, sessions
Running migrations:
Applying captcha.0001_initial... OK
Applying captcha.0002_alter_captchastore_id... OK
有没有人可以解释一下这个问题的原因...
文章讲述了在Pycharm中安装并尝试迁移captcha包时遇到的ModuleNotFoundError问题,解决方案是在Anaconda的虚拟环境中激活,切换到manage.py路径后成功迁移的过程,以及涉及的迁移操作和应用表结构的更新。
2377

被折叠的 条评论
为什么被折叠?



