ImportError: No module named bootstrap3 even while using virtualenv

ImportError: No module named bootstrap3 even while using virtualenv

通过

安装bootstrap3之后
$ pip install django-bootstrap3

而我的 virtualenv 处于活动状态。即

(venv)deathstroke@Batcomputer:~/Documents/DjangoProjects/venv/bin$ pip install django-bootstrap3

但是报如下错误-

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/deathstroke/Documents/DjangoProjects/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/home/deathstroke/Documents/DjangoProjects/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
    django.setup()
  File "/home/deathstroke/Documents/DjangoProjects/venv/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/deathstroke/Documents/DjangoProjects/venv/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/home/deathstroke/Documents/DjangoProjects/venv/local/lib/python2.7/site-packages/django/apps/config.py", line 119, in create
    import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named bootstrap3

当我 运行 import bootstrap3 在 shell 时,它起作用了。

为什么我的 Django 应用找不到或无法识别它?

显然 INSTALLED APPS 包含 'django_admin_bootstrapped.bootstrap3',但无法识别并引发错误。我用简单的 'bootstrap3', 替换了它并且它工作得很好。

运行 命令下方

pip install django-bootstrap3

并在 INSTALLED APPS 中添加 bootstrap3

有关信息,请转至下方 pypi.org/project/django-bootstrap3