Was attempting to use bootstrap for my project using CDN, but now attempting to just install it manually.
Followed the W3 schools tutorial exactly: Django - Add Bootstrap 5.
However, when I try to runserver, I get this error:
C:\Users\Sammc\OneDrive - Ulster University\Desktop\django_project\groc>python manage.py runserver
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Sammc\AppData\Roaming\Python\Python310\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\Sammc\AppData\Roaming\Python\Python310\site-packages\django\core\management\commands\runserver.py", line 125, in inner_run
autoreload.raise_last_exception()
File "C:\Users\Sammc\AppData\Roaming\Python\Python310\site-packages\django\utils\autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "C:\Users\Sammc\AppData\Roaming\Python\Python310\site-packages\django\core\management\__init__.py", line 398, in execute
autoreload.check_errors(django.setup)()
File "C:\Users\Sammc\AppData\Roaming\Python\Python310\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\Sammc\AppData\Roaming\Python\Python310\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\Sammc\AppData\Roaming\Python\Python310\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "C:\Users\Sammc\AppData\Roaming\Python\Python310\site-packages\django\apps\config.py", line 193, in create
import_module(entry)
File "C:\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'bootstrap5'
As you can see, I have referenced it correctly in settings.py:
INSTALLED_APPS = [
'customer',
'shop',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'bootstrap5',
]
Any help appreciated!