Skip to content
Advertisement

ModuleNotFoundError: No module named ‘bootstrap4’

I installed bootstrap4 with

$ pip install django-bootstrap4

It is being installed in this directory

C:Userstradetechpit-match-envLibsite-packages

Django seems to be looking at this directory

C:UserstradeAnaconda3libsite-packagesdjango

When I put ‘bootstrap4’ in the INSTALLED_APPS = (‘bootstrap4’) variable and then run

$ python manage.py runserver

I get this error

JavaScript

How can I resolve this error? I installed bootstrap4 in the django folder by using copy and paste and that did not work. Any help would be greatly appreciated.

Thank You!

Advertisement

Answer

JavaScript

This locates pip on the python module path, thus ensuring that you install bootstrap4 in the same python environment that you use to run the manage.py commands. See this.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement