ModuleNotFoundError: No module named 'django.contrib.admin' in pythonanywhere

933 Views Asked by At

hi i know this is repetitive question but i checked everywhere and i checkd my urls and import stuffs but it does not fix i don't know which file path is incorrect i clone my project from github and my project in localhost works all right but in pythonanywhere.com i have this error here is my wsgi.py code:

import os
import sys

path = '/home/gazegan/blood-donor/bblood/'
if path not in sys.path:
sys.path.append(path)


os.environ['DJANGO_SETTINGS_MODULE'] = 'bblood.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

and this is the full error:

Error running WSGI application
ModuleNotFoundError: No module named 'django.contrib.admin'
File "/var/www/gazegan_pythonanywhere_com_wsgi.py", line 57, in <module>
application = get_wsgi_application()

File "/home/gazegan/.virtualenvs/myenv/lib/python3.8/site- 
packages/django/core/wsgi.py", line 12, in
django.setup(set_prefix=False)
File "/home/gazegan/.virtualenvs/myenv/lib/python3.8/site- 
packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/gazegan/.virtualenvs/myenv/lib/python3.8/site- 
packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/home/gazegan/.virtualenvs/myenv/lib/python3.8/site- 
packages/django/apps/config.py", line 136, in create
import_module(entry)

please help me :(

0

There are 0 best solutions below