Getting the following error: when setting up my Django application, hoping someone might be able to assist
2018-03-03 07:01:12,197: Error running WSGI application
2018-03-03 07:01:12,198: ImportError: No module named 'pymysql'
2018-03-03 07:01:12,198: File "/var/www/myapplication_pythonanywhere_com_wsgi.py", line 29, in <module>
2018-03-03 07:01:12,198: application = get_wsgi_application()
2018-03-03 07:01:12,198:
2018-03-03 07:01:12,198: File "/usr/local/lib/python3.5/dist-packages/django/core/wsgi.py", line 13, in get_wsgi_application
2018-03-03 07:01:12,198: django.setup(set_prefix=False)
2018-03-03 07:01:12,199:
2018-03-03 07:01:12,199: File "/usr/local/lib/python3.5/dist-packages/django/__init__.py", line 22, in setup
2018-03-03 07:01:12,199: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2018-03-03 07:01:12,199:
2018-03-03 07:01:12,199: File "/usr/local/lib/python3.5/dist-packages/django/conf/__init__.py", line 53, in __getattr__
2018-03-03 07:01:12,199: self._setup(name)
2018-03-03 07:01:12,199:
2018-03-03 07:01:12,199: File "/usr/local/lib/python3.5/dist-packages/django/conf/__init__.py", line 41, in _setup
2018-03-03 07:01:12,200: self._wrapped = Settings(settings_module)
2018-03-03 07:01:12,200:
2018-03-03 07:01:12,200: File "/usr/local/lib/python3.5/dist-packages/django/conf/__init__.py", line 97, in __init__
2018-03-03 07:01:12,200: mod = importlib.import_module(self.SETTINGS_MODULE)
2018-03-03 07:01:12,200:
2018-03-03 07:01:12,200: File "./config/settings/__init__.py", line 1, in <module>
2018-03-03 07:01:12,200: import pymysql
The site works fine local, setting up in "production" following the steps form: http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-pythonanywhere.html
The /var/www/myapplication_pythonanywhere_com_wsgi.py looks like below with the postactivate in the virtual environment looking similar
> import os import sys path = 'home/myapplication/myapplication/' if
> path not in sys.path:
> sys.path.append(path)
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings.production'
> os.environ['DJANGO_SECRET_KEY'] = 'is filled in correctly ''
> os.environ['DJANGO_ALLOWED_HOSTS'] =
> 'http://myapplication.pythonanywhere.com/'
> os.environ['DJANGO_ADMIN_URL'] =
> 'http://myapplication.pythonanywhere.com/something'
> os.environ['DJANGO_MAILGUN_API_KEY'] = ''
> os.environ['DJANGO_MAILGUN_SERVER_NAME'] = ''
> os.environ['MAILGUN_SENDER_DOMAIN'] = ''
> os.environ['DJANGO_AWS_ACCESS_KEY_ID'] = ''
> os.environ['DJANGO_AWS_SECRET_ACCESS_KEY'] = ''
> os.environ['DJANGO_AWS_STORAGE_BUCKET_NAME'] = ''
> os.environ['DATABASE_URL'] =
> 'mysql://myapplication:thepassowrd@myapplication.mysql.pythonanywhere-services.com/database$user'
>
> from django.core.wsgi import get_wsgi_application application =
> get_wsgi_application()
Of course running pip install mysqlclient or pymysql
is says that the Requirement already satisfied.
Database seems to have set-up tables and everything ok so doesn't seems like an issue there
Any thoughts ? Any assistance would be greatly appericated