ModuleNotFoundError:没有名为“taggit”的模块;
我使用 pip install 来安装 django taggit,我确认 pip freeze 是否存在,我在已安装的应用程序中包含 taggit,当我想要进行迁移时,它给了我这个错误 ModuleNotFoundError: No module named 'taggit'< /code>,我使用 pip freeze 来确认已安装并已安装,我将其添加到installed_apps并且也在那里
我尝试卸载/安装尝试不同的版本但不起作用它总是给我相同的错误ModuleNotFoundError:没有名为“taggit”的模块
,即使已安装在已安装的应用程序上,并且我使用 pip freeze 确认该模块位于目录中,有什么想法吗?
I used pip install to install django taggit, I am confirming that is there with pip freeze I am including taggit on installed apps and when I want to do the migrations it gives me this error ModuleNotFoundError: No module named 'taggit'
, I used pip freeze to confirm that is installed and is installed, I added it to installed_apps and is there as well
I tried to uninstall/ install try different versions and is not working it gives me always same error ModuleNotFoundError: No module named 'taggit'
, even though is installed on installed apps and I confirmed with pip freeze that is on the directory, any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这对我有用。我浏览到我的 virtualenv 的站点包,注意到“taggit”模块是以“django-taggit-3.1.0”之类的名称安装的。在其中找到真正的“taggit”包并剪切并粘贴该模块,它的内容位于我的 virtualenv 的站点包的根目录中。
我没有像 "env/lib/site-packages/django-taggit-3.1.0/taggit" 这样的路径,而是 <强>“env/lib/site-packages/taggit”。
This worked for me. I browsed to the site-packages of my virtualenv, noticed that "taggit" module was installed under a name like "django-taggit-3.1.0". Found the real "taggit" package inside it and cut and pasted the module, and it contents in the root directory of the site-packages of my virtualenv.
Instead of having a path like that "env/lib/site-packages/django-taggit-3.1.0/taggit", I'm having that "env/lib/site-packages/taggit".
就我而言,我在运行脚本时忘记激活安装了 django-taggit 的环境(即在一个控制台窗口中激活它,但在我所在的控制台窗口中没有这样做)运行
python manage.py runserver
脚本`)。In my case, I have forgotten to activate the environment where
django-taggit
was installed when I was running a script (i.e. activated it in one console window, but didn't do it in the one I was running thepython manage.py runserver
script`).您必须使用此命令安装它
然后添加到您的设置中。下面是设置中的样子。
以下是有关 taggit https://www.youtube 的更多信息的视频链接。 com/watch?v=dZywiX-Glu4
You have to install it with this command
Then add to your setting. bellow is what it should look like in settings.
here is a link to a video with more info about taggit https://www.youtube.com/watch?v=dZywiX-Glu4