如何清楚地卸载django-watson库
How to uninstall django-watson library clearly
我想在 django 中使用搜索库
所以我决定使用 django-watson(它告诉我易于安装,易于使用)
我指挥
git clone https://github.com/etianen/django-watson.git
在我的 Django 项目中
并在我的 settings.py. INSTALLED_APPS
中插入 watson
当我指挥
python manage.py migrate
django 找不到 watson
所以我决定卸载 django-watson
并重新安装
我指挥
rm -rf django-watson
和命令migrate
(检查我什么时候卸载library migrate没问题)
python manage.py migrate
突然它给我显示错误
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/apps/config.py", line 116, in create
mod = import_module(mod_path)
File "/Users/hanminsoo/.pyenv/versions/3.5.1/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 944, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'django-watson'
我认为它已经安装在 env 中,但我找不到 django-watson
我想清楚地删除django-watson
请有人帮助我
确保您已将其从 settings.py 中的 INSTALLED_APPS 中删除,并且您已删除项目中与其相关的所有导入。
如上所述,您必须从已安装的应用程序中删除 django-watson
。但这是最初的错误:要安装 watson,您必须将 watson
添加到 INSTALLED_APPS
,而不是 django-watson
。 This is well explained in the documentation:
- Install django-watson using pip: pip install django-watson.
- Add 'watson' to your INSTALLED_APPS setting.
我想在 django 中使用搜索库
所以我决定使用 django-watson(它告诉我易于安装,易于使用)
我指挥
git clone https://github.com/etianen/django-watson.git
在我的 Django 项目中
并在我的 settings.py. INSTALLED_APPS
watson
当我指挥
python manage.py migrate
django 找不到 watson
所以我决定卸载 django-watson
并重新安装
我指挥
rm -rf django-watson
和命令migrate
(检查我什么时候卸载library migrate没问题)
python manage.py migrate
突然它给我显示错误
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/apps/config.py", line 116, in create
mod = import_module(mod_path)
File "/Users/hanminsoo/.pyenv/versions/3.5.1/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 944, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'django-watson'
我认为它已经安装在 env 中,但我找不到 django-watson
我想清楚地删除django-watson
请有人帮助我
确保您已将其从 settings.py 中的 INSTALLED_APPS 中删除,并且您已删除项目中与其相关的所有导入。
如上所述,您必须从已安装的应用程序中删除 django-watson
。但这是最初的错误:要安装 watson,您必须将 watson
添加到 INSTALLED_APPS
,而不是 django-watson
。 This is well explained in the documentation:
- Install django-watson using pip: pip install django-watson.
- Add 'watson' to your INSTALLED_APPS setting.