Reputation: 170
I have activated a virtual environment for a Django project.
I have installed django-grappelli using pip into that virtual environment.
pip install django-grappelli
When calling 'pip list', I can see it's installed.
Package Version
---------------- -------
asgiref 3.5.2
Django 4.0.5
django-grappelli 3.0.3
pip 22.1.2
psycopg2 2.9.3
setuptools 58.1.0
sqlparse 0.4.2
tzdata 2022.1
In my project setting I added Grappelli app above Django contrib as instructed by Grappelli docs:
INSTALLED_APPS = (
'grappelli',
'django.contrib.admin',
)
Then I added the URL confs accordingly as instructed by Grappelli docs:
from django.conf.urls import include
urlpatterns = [
path('grappelli/', include('grappelli.urls')), # grappelli URLS
path('admin/', admin.site.urls), # admin site
]
When checking if it is all good calling py manage.py check I get a ModuleNotFoundError: No module named 'grappelli' error.
I looked at lib/site-packages and in fact, django-grappelli isn't showing there (see picture).
I tested in a python shell importing for 'grappelli' and 'django-grappelli' but python says no module found for each of these.
Essentially pip shows it's installed, but python, hence django, think otherwise.
Tested Grappelli in another simpler project and did not run into this problem. There is obviously something I am missing here and it is probably right under my nose, but thus far I felt useless. Similar questions I have looked at did not offer enough enlightenment. Can anyone help me, please? I am working with Python 3.10.4 in windows. Thank you!
Upvotes: 0
Views: 106