首页 文章

ModuleNotFoundError:没有名为'bootstrapform'的模块

提问于
浏览
0

我收到一个错误,ModuleNotFoundError:没有名为'bootstrapform'的模块 . 当我运行python manage.py runserver时,会发生此错误 . Traceback说

Traceback (most recent call last):
      File "/Users/XXX/anaconda/envs/py36/lib/python3.6/site-packages/django/utils/autoreload.py", line 228, in wrapper
        fn(*args, **kwargs)
      File "/Users/XXX/anaconda/envs/py36/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run
        autoreload.raise_last_exception()
      File "/Users/XXX/anaconda/envs/py36/lib/python3.6/site-packages/django/utils/autoreload.py", line 251, in raise_last_exception
        six.reraise(*_exception)
      File "/Users/XXX/anaconda/envs/py36/lib/python3.6/site-packages/django/utils/six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "/Users/XXX/anaconda/envs/py36/lib/python3.6/site-packages/django/utils/autoreload.py", line 228, in wrapper
        fn(*args, **kwargs)
      File "/Users/XXX/anaconda/envs/py36/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
        apps.populate(settings.INSTALLED_APPS)
      File "/Users/XXX/anaconda/envs/py36/lib/python3.6/site-packages/django/apps/registry.py", line 85, in populate
        app_config = AppConfig.create(entry)
      File "/Users/XXX/anaconda/envs/py36/lib/python3.6/site-packages/django/apps/config.py", line 94, in create
        module = import_module(entry)
      File "/Users/XXX/anaconda/envs/py36/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 978, in _gcd_import
      File "<frozen importlib._bootstrap>", line 961, in _find_and_load
      File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'bootstrapform'

我在settings.py中写道

import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATIC_URL = '/static/'

STATICFILES_DIRS = [os.path.join(BASE_DIR,'bootflat.github.io'), ]

目录结构就像

-PythonServer
  -PythonServer
  -logic
   -static
    -index.css
   -templates
    -index.html
  -boolflat.github.io
  -bower_components

我运行pip install django-versatileimagefield == 1.2.2&pip install rules,但是同样的错误发生了 . 我该如何修复这个错误?

1 回答

相关问题