Forums

System image upgrade issue

Hello,

My current system image is fishnchips:

Default Python Versions
You need to upgrade your system image to be able to change your default python command.

python should run:2.7
python3 should run:3.8
The editor Run button should use:3.8

I want to change it to haggis. based on the instructions I do the required tasks for creating a new virtualenv, getting the used python version, creating the requirements.txt then installing packages from the reuirements.txt in the new vitualenv, and assigning that virtualenv in the "web" tab and reloading the website. but I get the below errors: The result of changing the system image

https://drive.google.com/file/d/1TG1SWRvYE1wyR2JnuMthgOVpKurD7mox/view?usp=sharing and in the error logs I get:

2023-08-10 08:02:08,100: ***************************************************
2023-08-10 08:02:08,100: If you're seeing an import error and don't know why,
2023-08-10 08:02:08,100: we have a dedicated help page to help you debug: 
2023-08-10 08:02:08,100: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-10 08:02:08,100: ***************************************************
2023-08-10 08:11:31,694: Error running WSGI application
2023-08-10 08:11:31,709: NameError: name '_mysql' is not defined
2023-08-10 08:11:31,709:   File "/var/www/www_panycompany_com_wsgi.py", line 16, in <module>
2023-08-10 08:11:31,709:     application = get_wsgi_application()
2023-08-10 08:11:31,709: 
2023-08-10 08:11:31,709:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2023-08-10 08:11:31,709:     django.setup(set_prefix=False)
2023-08-10 08:11:31,709: 
2023-08-10 08:11:31,709:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2023-08-10 08:11:31,710:     apps.populate(settings.INSTALLED_APPS)
2023-08-10 08:11:31,710: 
2023-08-10 08:11:31,710:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
2023-08-10 08:11:31,710:     app_config.import_models()
2023-08-10 08:11:31,710: 
2023-08-10 08:11:31,710:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
2023-08-10 08:11:31,710:     self.models_module = import_module(models_module_name)
2023-08-10 08:11:31,710: 
2023-08-10 08:11:31,710:   File "/home/PanyCompany/pany01/mywebsite/website/models.py", line 12, in <module>
2023-08-10 08:11:31,710:     class Brand(models.Model):
2023-08-10 08:11:31,710: 
2023-08-10 08:11:31,710:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 122, in __new__
2023-08-10 08:11:31,711:     new_class.add_to_class('_meta', Options(meta, app_label))
2023-08-10 08:11:31,711: 
2023-08-10 08:11:31,711:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
2023-08-10 08:11:31,711:     value.contribute_to_class(cls, name)
2023-08-10 08:11:31,711: 
2023-08-10 08:11:31,711:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
2023-08-10 08:11:31,711:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
2023-08-10 08:11:31,711: 
2023-08-10 08:11:31,711:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 15, in __getattr__
2023-08-10 08:11:31,711:     return getattr(self._connections[self._alias], item)
2023-08-10 08:11:31,711: 
2023-08-10 08:11:31,712:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 62, in __getitem__
2023-08-10 08:11:31,712:     conn = self.create_connection(alias)
2023-08-10 08:11:31,712: 
2023-08-10 08:11:31,712:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
2023-08-10 08:11:31,712:     backend = load_backend(db['ENGINE'])
2023-08-10 08:11:31,712: 
2023-08-10 08:11:31,712:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
2023-08-10 08:11:31,712:     return import_module('%s.base' % backend_name)
2023-08-10 08:11:31,712: 
2023-08-10 08:11:31,712:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
2023-08-10 08:11:31,713:     import MySQLdb as Database
2023-08-10 08:11:31,713: 
2023-08-10 08:11:31,713:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/MySQLdb/__init__.py", line 24, in <module>
2023-08-10 08:11:31,713:     version_info, _mysql.version_info, _mysql.__file__
2023-08-10 08:11:31,713: ***************************************************
2023-08-10 08:11:31,713: If you're seeing an import error and don't know why,
2023-08-10 08:11:31,713: we have a dedicated help page to help you debug: 
2023-08-10 08:11:31,713: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-10 08:11:31,713: ***************************************************
2023-08-10 08:14:56,552: Not Found: /static/website/site.webmanifest
2023-08-10 08:19:55,871: Not Found: /static/website/site.webmanifest

I would appreciate your help.

[edit by admin: formatting]

Could you try activating your virtualenv, and then running:

pip install --force-reinstall mysqlclient

...and then reloading your website to see if that helps?

Hi Giles,

I did activate my new virtualenv () and also changed the system image to haggis, the result:

18:53 ~ (main)$ workon 
PanyCo-venv-P3.8
mysite-virtualenv
18:54 ~ (main)$ workon PanyCo-venv-P3.8
(PanyCo-venv-P3.8) 18:54 ~ (main)$ pip freeze
asgiref==3.3.4
click==8.1.3
defusedxml==0.7.1
diff-match-patch==20200713
Django==3.2
django-admin-interface==0.16.3
django-colorfield==0.4.1
django-filter==2.4.0
django-flat-responsive==2.0
django-flat-theme==1.1.4
django-import-export==2.5.0
django-phonenumber-field==5.0.0
django-tables2==2.3.4
django-tinymce==3.5.0
easy-thumbnails==2.8.5
et-xmlfile==1.0.1
MarkupPy==1.14
mysql-connector-python==8.1.0
mysqlclient==2.0.3
odfpy==1.4.1
openpyxl==3.0.7
pdf2image==1.16.0
phonenumbers==8.12.20
Pillow==8.1.0
poppler-utils==0.1.0
protobuf==4.21.12
pytz==2021.1
PyYAML==5.4.1
six==1.15.0
sqlparse==0.4.1
tablib==3.0.0
xlrd==2.0.1
xlwt==1.3.0
(PanyCo-venv-P3.8) 18:54 ~ (main)$ 
(PanyCo-venv-P3.8) 18:54 ~ (main)$ pip install --force-reinstall mysqlclient
Looking in links: /usr/share/pip-wheels
Collecting mysqlclient
  Using cached mysqlclient-2.2.0-cp38-cp38-linux_x86_64.whl
Installing collected packages: mysqlclient
  Attempting uninstall: mysqlclient
    Found existing installation: mysqlclient 2.0.3
    Uninstalling mysqlclient-2.0.3:
      Successfully uninstalled mysqlclient-2.0.3
Successfully installed mysqlclient-2.2.0
(PanyCo-venv-P3.8) 18:55 ~ (main)$

Then I reload the website from "Web" tab, But no result.

But this time from the Error Logs I get, which differs from the old logs, it says "Did you install mysqlclient?" which I assume it is because this time it installed a mysqlclient-2.2.0 instead of the mysqlclient 2.0.3 :

2023-08-10 18:58:37,444: If you're seeing an import error and don't know why,
2023-08-10 18:58:37,444: we have a dedicated help page to help you debug: 
2023-08-10 18:58:37,444: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-10 18:58:37,444: ***************************************************
2023-08-10 18:58:38,724: Error running WSGI application
2023-08-10 18:58:38,725: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
2023-08-10 18:58:38,725: Did you install mysqlclient?
2023-08-10 18:58:38,726:   File "/var/www/www_panycompany_com_wsgi.py", line 16, in <module>
2023-08-10 18:58:38,726:     application = get_wsgi_application()
2023-08-10 18:58:38,726: 
2023-08-10 18:58:38,726:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2023-08-10 18:58:38,726:     django.setup(set_prefix=False)
2023-08-10 18:58:38,726: 
2023-08-10 18:58:38,726:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2023-08-10 18:58:38,727:     apps.populate(settings.INSTALLED_APPS)
2023-08-10 18:58:38,727: 
2023-08-10 18:58:38,727:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
2023-08-10 18:58:38,727:     app_config.import_models()
2023-08-10 18:58:38,727: 
2023-08-10 18:58:38,727:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
2023-08-10 18:58:38,727:     self.models_module = import_module(models_module_name)
2023-08-10 18:58:38,728: 
2023-08-10 18:58:38,728:   File "/home/PanyCompany/pany01/mywebsite/website/models.py", line 12, in <module>
2023-08-10 18:58:38,728:     class Brand(models.Model):
2023-08-10 18:58:38,728: 
2023-08-10 18:58:38,728:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 122, in __new__
2023-08-10 18:58:38,728:     new_class.add_to_class('_meta', Options(meta, app_label))
2023-08-10 18:58:38,728: 
2023-08-10 18:58:38,729:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
2023-08-10 18:58:38,729:     value.contribute_to_class(cls, name)
2023-08-10 18:58:38,730: 
2023-08-10 18:58:38,730:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
2023-08-10 18:58:38,730:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
2023-08-10 18:58:38,730: 
2023-08-10 18:58:38,730:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 15, in __getattr__
2023-08-10 18:58:38,730:     return getattr(self._connections[self._alias], item)
2023-08-10 18:58:38,730: 
2023-08-10 18:58:38,731:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 62, in __getitem__
2023-08-10 18:58:38,731:     conn = self.create_connection(alias)
2023-08-10 18:58:38,731: 
2023-08-10 18:58:38,731:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
2023-08-10 18:58:38,731:     backend = load_backend(db['ENGINE'])
2023-08-10 18:58:38,731: 
2023-08-10 18:58:38,731:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
2023-08-10 18:58:38,732:     return import_module('%s.base' % backend_name)
2023-08-10 18:58:38,732: 
2023-08-10 18:58:38,732:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
2023-08-10 18:58:38,732:     raise ImproperlyConfigured(
2023-08-10 18:58:38,732: ***************************************************
2023-08-10 18:58:38,732: If you're seeing an import error and don't know why,
2023-08-10 18:58:38,733: we have a dedicated help page to help you debug: 
2023-08-10 18:58:38,733: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-10 18:58:38,733: ***************************************************

Thanks.

Are you sure that it is the newest error form the bottom of your error log?

Yes I did check it multiple times, with the below cmd that you suggested

pip install --force-reinstall mysqlclient

the result is as below, since it tries to install the latest version (mysqlclient-2.2.0-cp38-cp38-linux_x86_64.whl):

2023-08-10 18:58:37,444: ***************************************************
2023-08-10 18:58:37,444: If you're seeing an import error and don't know why,
2023-08-10 18:58:37,444: we have a dedicated help page to help you debug: 
2023-08-10 18:58:37,444: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-10 18:58:37,444: ***************************************************
2023-08-10 18:58:38,724: Error running WSGI application
2023-08-10 18:58:38,725: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
2023-08-10 18:58:38,725: Did you install mysqlclient?
2023-08-10 18:58:38,726:   File "/var/www/www_panycompany_com_wsgi.py", line 16, in <module>
2023-08-10 18:58:38,726:     application = get_wsgi_application()
2023-08-10 18:58:38,726: 
2023-08-10 18:58:38,726:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2023-08-10 18:58:38,726:     django.setup(set_prefix=False)
2023-08-10 18:58:38,726: 
2023-08-10 18:58:38,726:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2023-08-10 18:58:38,727:     apps.populate(settings.INSTALLED_APPS)
2023-08-10 18:58:38,727: 
2023-08-10 18:58:38,727:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
2023-08-10 18:58:38,727:     app_config.import_models()
2023-08-10 18:58:38,727: 
2023-08-10 18:58:38,727:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
2023-08-10 18:58:38,727:     self.models_module = import_module(models_module_name)
2023-08-10 18:58:38,728: 
2023-08-10 18:58:38,728:   File "/home/PanyCompany/pany01/mywebsite/website/models.py", line 12, in <module>
2023-08-10 18:58:38,728:     class Brand(models.Model):
2023-08-10 18:58:38,728: 
2023-08-10 18:58:38,728:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 122, in __new__
2023-08-10 18:58:38,728:     new_class.add_to_class('_meta', Options(meta, app_label))
2023-08-10 18:58:38,728: 
2023-08-10 18:58:38,729:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
2023-08-10 18:58:38,729:     value.contribute_to_class(cls, name)
2023-08-10 18:58:38,730: 
2023-08-10 18:58:38,730:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
2023-08-10 18:58:38,730:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
2023-08-10 18:58:38,730: 
2023-08-10 18:58:38,730:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 15, in __getattr__
2023-08-10 18:58:38,730:     return getattr(self._connections[self._alias], item)
2023-08-10 18:58:38,730: 
2023-08-10 18:58:38,731:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 62, in __getitem__
2023-08-10 18:58:38,731:     conn = self.create_connection(alias)
2023-08-10 18:58:38,731: 
2023-08-10 18:58:38,731:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
2023-08-10 18:58:38,731:     backend = load_backend(db['ENGINE'])
2023-08-10 18:58:38,731: 
2023-08-10 18:58:38,731:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
2023-08-10 18:58:38,732:     return import_module('%s.base' % backend_name)
2023-08-10 18:58:38,732: 
2023-08-10 18:58:38,732:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
2023-08-10 18:58:38,732:     raise ImproperlyConfigured(
2023-08-10 18:58:38,732: ***************************************************

and if I do

pip install --force-reinstall mysqlclient==2.0.3

then the Error logs are as below:

2023-08-10 18:58:38,732: ***************************************************
2023-08-10 18:58:38,732: If you're seeing an import error and don't know why,
2023-08-10 18:58:38,733: we have a dedicated help page to help you debug: 
2023-08-10 18:58:38,733: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-10 18:58:38,733: ***************************************************
2023-08-10 19:05:27,456: Error running WSGI application
2023-08-10 19:05:27,471: NameError: name '_mysql' is not defined
2023-08-10 19:05:27,471:   File "/var/www/www_panycompany_com_wsgi.py", line 16, in <module>
2023-08-10 19:05:27,471:     application = get_wsgi_application()
2023-08-10 19:05:27,472: 
2023-08-10 19:05:27,472:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2023-08-10 19:05:27,472:     django.setup(set_prefix=False)
2023-08-10 19:05:27,472: 
2023-08-10 19:05:27,472:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2023-08-10 19:05:27,473:     apps.populate(settings.INSTALLED_APPS)
2023-08-10 19:05:27,473: 
2023-08-10 19:05:27,473:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
2023-08-10 19:05:27,473:     app_config.import_models()
2023-08-10 19:05:27,474: 
2023-08-10 19:05:27,474:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
2023-08-10 19:05:27,474:     self.models_module = import_module(models_module_name)
2023-08-10 19:05:27,474: 
2023-08-10 19:05:27,475:   File "/home/PanyCompany/pany01/mywebsite/website/models.py", line 12, in <module>
2023-08-10 19:05:27,475:     class Brand(models.Model):
2023-08-10 19:05:27,475: 
2023-08-10 19:05:27,475:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 122, in __new__
2023-08-10 19:05:27,475:     new_class.add_to_class('_meta', Options(meta, app_label))
2023-08-10 19:05:27,475: 
2023-08-10 19:05:27,475:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
2023-08-10 19:05:27,475:     value.contribute_to_class(cls, name)
2023-08-10 19:05:27,475: 
2023-08-10 19:05:27,476:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
2023-08-10 19:05:27,476:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
2023-08-10 19:05:27,476: 
2023-08-10 19:05:27,476:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 15, in __getattr__
2023-08-10 19:05:27,476:     return getattr(self._connections[self._alias], item)
2023-08-10 19:05:27,476: 
2023-08-10 19:05:27,476:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 62, in __getitem__
2023-08-10 19:05:27,477:     conn = self.create_connection(alias)
2023-08-10 19:05:27,477: 
2023-08-10 19:05:27,477:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
2023-08-10 19:05:27,477:     backend = load_backend(db['ENGINE'])
2023-08-10 19:05:27,477: 
2023-08-10 19:05:27,477:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
2023-08-10 19:05:27,477:     return import_module('%s.base' % backend_name)
2023-08-10 19:05:27,478: 
2023-08-10 19:05:27,478:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
2023-08-10 19:05:27,478:     import MySQLdb as Database
2023-08-10 19:05:27,478: 
2023-08-10 19:05:27,479:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/MySQLdb/__init__.py", line 24, in <module>
2023-08-10 19:05:27,479:     version_info, _mysql.version_info, _mysql.__file__
2023-08-10 19:05:27,479: ***************************************************

Those errors are from yesterday evening at 19:05. Your site appears to be up and running at the moment -- did you solve the problem?

Yes the logs are from yesterday, I double checked the error logs. When I change the system image to the old one then it works. Now the website is using the fishnchips system image, that is why it is working. but with the new system image haggis it does not work.

Are you sure that, on haggis, you are using a virtualenv that was created when you were also on haggis. If you re-created the virtualenv while you were still on fishnchips, that would not be a virtualenv that you can use on haggis.

I changed to haggis system image and tried the whole process from the beginning, then created a new virtualenv but since in the old system image I had:

Current system image:fishnchips
Default Python Versions
You need to upgrade your system image to be able to change your default python command.

python should run:2.7
python3 should run:3.8
The editor Run button should use:3.8

when I changed to the haggis I got these:

Current system image:haggis
Default Python Versions
python should run:2.7
python3 should run:3.8
The editor Run button should use:3.8

and because of default python version of 2.7, when I tried to create the virtualenv but this time after changing the to haggis system image, which it gave the below output, :

created virtual environment CPython2.7.18.final.0-64 in 8026ms
  creator CPython2Posix(dest=/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, wheel=bundle, setuptools=bundle, via=copy, app_data_dir=/home/PanyCompany/.local/share/virtualenv)
    added seed packages: pip==20.3.4, setuptools==44.1.1, wheel==0.37.1
  activators NushellActivator,PythonActivator,FishActivator,CShellActivator,PowerShellActivator,BashActivator
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/preactivate
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/postactivate
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/get_env_details
(PanyCo-venv-P3.8) 15:47 ~ (main)$ workon 
PanyCo-venv-P3.8
mysite-virtualenv
(PanyCo-venv-P3.8) 15:47 ~ (main)$ pip install -r /tmp/requirements.txt 
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More
 details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in links: /usr/share/pip-wheels, /usr/share/pip-wheels
ERROR: Could not find a version that satisfies the requirement asgiref==3.3.4 (from -r /tmp/requirements.txt (line 2)) (from versions: 0.8, 0.9, 0.9.1, 0.10.0, 0.11.0, 0.11.1, 0.11.2, 0.12.0, 0.12.1, 0.1
3.0, 0.13.2, 0.13.3, 0.14.0, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 2.3.0, 2.3.1, 2.3.2, 3.0.0, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.2.0,
 3.2.1, 3.2.2, 3.2.3)
ERROR: No matching distribution found for asgiref==3.3.4 (from -r /tmp/requirements.txt (line 2))

.

so on the haggis I just changed the default system python from 2.7 to 3.8, and deleted the new virtualenv (PanyCo-venv-P3.8) so that I can create it with the new 3.8 default python system

(PanyCo-venv-P3.8) 15:48 ~ (main)$ deactivate 
15:49 ~ (main)$ rmvirtualenv PanyCo-venv-P3.8
Removing PanyCo-venv-P3.8...
15:51 ~ (main)$ mkvirtualenv PanyCo-venv-P3.8
created virtual environment CPython3.8.10.final.0-64 in 15717ms
  creator CPython3Posix(dest=/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/PanyCompany/.local/share/virtualenv)
    added seed packages: pip==22.1.2, setuptools==62.6.0, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/preactivate
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/postactivate
virtualenvwrapper.user_scripts creating /home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/bin/get_env_details
(PanyCo-venv-P3.8) 15:52 ~ (main)$ pip install -r /tmp/requirements.txt 
Looking in links: /usr/share/pip-wheels, /usr/share/pip-wheels
Collecting asgiref==3.3.4
  Using cached asgiref-3.3.4-py3-none-any.whl (22 kB)
Collecting click==8.1.3
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting defusedxml==0.7.1
  Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting diff-match-patch==20200713
  Using cached diff_match_patch-20200713-py3-none-any.whl (61 kB)
Collecting Django==3.2
  Using cached Django-3.2-py3-none-any.whl (7.9 MB)
Collecting django-admin-interface==0.16.3
  Using cached django_admin_interface-0.16.3-py3-none-any.whl (199 kB)
Collecting django-colorfield==0.4.1
  Using cached django_colorfield-0.4.1-py3-none-any.whl (46 kB)
Collecting django-filter==2.4.0
  Using cached django_filter-2.4.0-py3-none-any.whl (73 kB)
Collecting django-flat-responsive==2.0
  Using cached django_flat_responsive-2.0-py3-none-any.whl
Collecting django-flat-theme==1.1.4
  Using cached django_flat_theme-1.1.4-py3-none-any.whl
Collecting django-import-export==2.5.0
  Using cached django_import_export-2.5.0-py3-none-any.whl (94 kB)
Collecting django-phonenumber-field==5.0.0
  Using cached django_phonenumber_field-5.0.0-py3-none-any.whl (53 kB)
Collecting django-tables2==2.3.4
  Using cached django_tables2-2.3.4-py2.py3-none-any.whl (91 kB)
Collecting django-tinymce==3.5.0
  Using cached django_tinymce-3.5.0-py3-none-any.whl (1.1 MB)
Collecting easy-thumbnails==2.8.5
  Using cached easy_thumbnails-2.8.5-py3-none-any.whl (75 kB)
Collecting et-xmlfile==1.0.1
  Downloading et_xmlfile-1.0.1.tar.gz (8.4 kB)
  Preparing metadata (setup.py) ... done
Collecting MarkupPy==1.14
  Using cached MarkupPy-1.14-py3-none-any.whl
Collecting mysqlclient==2.0.3
  Using cached mysqlclient-2.0.3-cp38-cp38-linux_x86_64.whl
Collecting odfpy==1.4.1
  Using cached odfpy-1.4.1-py2.py3-none-any.whl
Collecting openpyxl==3.0.7
  Using cached openpyxl-3.0.7-py2.py3-none-any.whl (243 kB)
Collecting pdf2image==1.16.0
  Using cached pdf2image-1.16.0-py3-none-any.whl (10 kB)
Collecting phonenumbers==8.12.20
  Using cached phonenumbers-8.12.20-py2.py3-none-any.whl (2.6 MB)
Collecting Pillow==8.1.0
  Using cached Pillow-8.1.0-cp38-cp38-manylinux1_x86_64.whl (2.2 MB)
Collecting poppler-utils==0.1.0
  Using cached poppler_utils-0.1.0-py3-none-any.whl (9.2 kB)
Collecting pytz==2021.1
  Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting PyYAML==5.4.1
  Using cached PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl (662 kB)
Collecting six==1.15.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting sqlparse==0.4.1
  Using cached sqlparse-0.4.1-py3-none-any.whl (42 kB)
Collecting tablib==3.0.0
  Using cached tablib-3.0.0-py3-none-any.whl (47 kB)
Collecting xlrd==2.0.1
  Using cached xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
Collecting xlwt==1.3.0
  Using cached xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
Collecting tablib[html,ods,xls,xlsx,yaml]>=0.14.0
  Downloading tablib-3.5.0-py3-none-any.whl (45 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.5/45.5 kB 899.8 kB/s eta 0:00:00
  Using cached tablib-3.4.0-py3-none-any.whl (45 kB)
  Using cached tablib-3.3.0-py3-none-any.whl (48 kB)
  Using cached tablib-3.2.1-py3-none-any.whl (48 kB)
  Using cached tablib-3.2.0-py3-none-any.whl (48 kB)
  Using cached tablib-3.1.0-py3-none-any.whl (48 kB)
Building wheels for collected packages: et-xmlfile
  Building wheel for et-xmlfile (setup.py) ... done
  Created wheel for et-xmlfile: filename=et_xmlfile-1.0.1-py3-none-any.whl size=8899 sha256=8895adfa7a90a8632a125069bc55ba2b077ccb6db5b8400faed658746dfa3a81
  Stored in directory: /home/PanyCompany/.cache/pip/wheels/6e/df/38/abda47b884e3e25f9f9b6430e5ce44c47670758a50c0c51759
Successfully built et-xmlfile
Installing collected packages: xlwt, pytz, phonenumbers, MarkupPy, et-xmlfile, django-tinymce, django-flat-theme, django-flat-responsive, django-colorfield, xlrd, tablib, sqlparse, six, PyYAML, Pillow, o
penpyxl, mysqlclient, diff-match-patch, defusedxml, click, asgiref, poppler-utils, pdf2image, odfpy, django-admin-interface, Django, easy-thumbnails, django-tables2, django-phonenumber-field, django-filt
er, django-import-export
Successfully installed Django-3.2 MarkupPy-1.14 Pillow-8.1.0 PyYAML-5.4.1 asgiref-3.3.4 click-8.1.3 defusedxml-0.7.1 diff-match-patch-20200713 django-admin-interface-0.16.3 django-colorfield-0.4.1 django
-filter-2.4.0 django-flat-responsive-2.0 django-flat-theme-1.1.4 django-import-export-2.5.0 django-phonenumber-field-5.0.0 django-tables2-2.3.4 django-tinymce-3.5.0 easy-thumbnails-2.8.5 et-xmlfile-1.0.1
 mysqlclient-2.0.3 odfpy-1.4.1 openpyxl-3.0.7 pdf2image-1.16.0 phonenumbers-8.12.20 poppler-utils-0.1.0 pytz-2021.1 six-1.15.0 sqlparse-0.4.1 tablib-3.0.0 xlrd-2.0.1 xlwt-1.3.0
(PanyCo-venv-P3.8) 15:55 ~ (main)$ pip freeze
asgiref==3.3.4
click==8.1.3
defusedxml==0.7.1
diff-match-patch==20200713
Django==3.2
django-admin-interface==0.16.3
django-colorfield==0.4.1
django-filter==2.4.0
django-flat-responsive==2.0
django-flat-theme==1.1.4
django-import-export==2.5.0
django-phonenumber-field==5.0.0
django-tables2==2.3.4
django-tinymce==3.5.0
easy-thumbnails==2.8.5
et-xmlfile==1.0.1
MarkupPy==1.14
mysqlclient==2.0.3
odfpy==1.4.1
openpyxl==3.0.7
pdf2image==1.16.0
phonenumbers==8.12.20
Pillow==8.1.0
poppler-utils==0.1.0
pytz==2021.1
PyYAML==5.4.1
six==1.15.0
sqlparse==0.4.1
tablib==3.0.0
xlrd==2.0.1
xlwt==1.3.0
(PanyCo-venv-P3.8) 15:58 ~ (main)$

and from The Error logs I get:

2023-08-12 15:56:58,088: Error running WSGI application
2023-08-12 15:56:58,112: NameError: name '_mysql' is not defined
2023-08-12 15:56:58,112:   File "/var/www/www_panycompany_com_wsgi.py", line 16, in <module>
2023-08-12 15:56:58,112:     application = get_wsgi_application()
2023-08-12 15:56:58,112: 
2023-08-12 15:56:58,112:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2023-08-12 15:56:58,112:     django.setup(set_prefix=False)
2023-08-12 15:56:58,112: 
2023-08-12 15:56:58,112:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2023-08-12 15:56:58,112:     apps.populate(settings.INSTALLED_APPS)
2023-08-12 15:56:58,113: 
2023-08-12 15:56:58,113:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
2023-08-12 15:56:58,113:     app_config.import_models()
2023-08-12 15:56:58,113: 
2023-08-12 15:56:58,113:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
2023-08-12 15:56:58,113:     self.models_module = import_module(models_module_name)
2023-08-12 15:56:58,113: 
2023-08-12 15:56:58,113:   File "/home/PanyCompany/pany01/mywebsite/website/models.py", line 12, in <module>
2023-08-12 15:56:58,113:     class Brand(models.Model):
2023-08-12 15:56:58,113: 
2023-08-12 15:56:58,113:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 122, in __new__
2023-08-12 15:56:58,113:     new_class.add_to_class('_meta', Options(meta, app_label))
2023-08-12 15:56:58,113: 
2023-08-12 15:56:58,114:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
2023-08-12 15:56:58,114:     value.contribute_to_class(cls, name)
2023-08-12 15:56:58,114: 
2023-08-12 15:56:58,114:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
2023-08-12 15:56:58,114:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
2023-08-12 15:56:58,114: 
2023-08-12 15:56:58,114:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 15, in __getattr__
2023-08-12 15:56:58,114:     return getattr(self._connections[self._alias], item)
2023-08-12 15:56:58,114: 
2023-08-12 15:56:58,114:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 62, in __getitem__
2023-08-12 15:56:58,114:     conn = self.create_connection(alias)
2023-08-12 15:56:58,114: 
2023-08-12 15:56:58,115:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
2023-08-12 15:56:58,115:     backend = load_backend(db['ENGINE'])
2023-08-12 15:56:58,115: 
2023-08-12 15:56:58,115:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
2023-08-12 15:56:58,115:     return import_module('%s.base' % backend_name)
2023-08-12 15:56:58,115: 
2023-08-12 15:56:58,115:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
2023-08-12 15:56:58,115:     import MySQLdb as Database
2023-08-12 15:56:58,115: 
2023-08-12 15:56:58,115:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/MySQLdb/__init__.py", line 24, in <module>
2023-08-12 15:56:58,115:     version_info, _mysql.version_info, _mysql.__file__
2023-08-12 15:56:58,115: ***************************************************
2023-08-12 15:56:58,116: If you're seeing an import error and don't know why,
2023-08-12 15:56:58,116: we have a dedicated help page to help you debug: 
2023-08-12 15:56:58,116: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-12 15:56:58,116: ***************************************************
2023-08-12 15:56:59,455: Error running WSGI application
2023-08-12 15:56:59,462: NameError: name '_mysql' is not defined
2023-08-12 15:56:59,462:   File "/var/www/www_panycompany_com_wsgi.py", line 16, in <module>
2023-08-12 15:56:59,462:     application = get_wsgi_application()
2023-08-12 15:56:59,463: 
2023-08-12 15:56:59,463:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2023-08-12 15:56:59,463:     django.setup(set_prefix=False)
2023-08-12 15:56:59,463: 
2023-08-12 15:56:59,463:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2023-08-12 15:56:59,463:     apps.populate(settings.INSTALLED_APPS)
2023-08-12 15:56:59,463: 
2023-08-12 15:56:59,463:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
2023-08-12 15:56:59,463:     app_config.import_models()
2023-08-12 15:56:59,463: 
2023-08-12 15:56:59,463:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
2023-08-12 15:56:59,463:     self.models_module = import_module(models_module_name)
2023-08-12 15:56:59,464: 
2023-08-12 15:56:59,464:   File "/home/PanyCompany/pany01/mywebsite/website/models.py", line 12, in <module>
2023-08-12 15:56:59,464:     class Brand(models.Model):
2023-08-12 15:56:59,464: 
2023-08-12 15:56:59,464:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 122, in __new__
2023-08-12 15:56:59,464:     new_class.add_to_class('_meta', Options(meta, app_label))
2023-08-12 15:56:59,464: 
2023-08-12 15:56:59,464:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
2023-08-12 15:56:59,464:     value.contribute_to_class(cls, name)
2023-08-12 15:56:59,464: 
2023-08-12 15:56:59,464:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
2023-08-12 15:56:59,464:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
2023-08-12 15:56:59,465: 
2023-08-12 15:56:59,465:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 15, in __getattr__
2023-08-12 15:56:59,465:     return getattr(self._connections[self._alias], item)
2023-08-12 15:56:59,465: 
2023-08-12 15:56:59,465:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 62, in __getitem__
2023-08-12 15:56:59,465:     conn = self.create_connection(alias)
2023-08-12 15:56:59,465: 
2023-08-12 15:56:59,465:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
2023-08-12 15:56:59,465:     backend = load_backend(db['ENGINE'])
2023-08-12 15:56:59,465: 
2023-08-12 15:56:59,465:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
2023-08-12 15:56:59,465:     return import_module('%s.base' % backend_name)
2023-08-12 15:56:59,465: 
2023-08-12 15:56:59,466:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
2023-08-12 15:56:59,466:     import MySQLdb as Database
2023-08-12 15:56:59,466: 
2023-08-12 15:56:59,466:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/MySQLdb/__init__.py", line 24, in <module>
2023-08-12 15:56:59,466:     version_info, _mysql.version_info, _mysql.__file__
2023-08-12 15:56:59,466: ***************************************************
2023-08-12 15:56:59,466: If you're seeing an import error and don't know why,
2023-08-12 15:56:59,466: we have a dedicated help page to help you debug: 
2023-08-12 15:56:59,466: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-12 15:56:59,466: ***************************************************

then I also did as below:

(PanyCo-venv-P3.8) 15:58 ~ (main)$ pip install --force-reinstall mysqlclient
Looking in links: /usr/share/pip-wheels
Collecting mysqlclient
  Using cached mysqlclient-2.2.0-cp38-cp38-linux_x86_64.whl
Installing collected packages: mysqlclient
  Attempting uninstall: mysqlclient
    Found existing installation: mysqlclient 2.0.3
    Uninstalling mysqlclient-2.0.3:
      Successfully uninstalled mysqlclient-2.0.3
Successfully installed mysqlclient-2.2.0
(PanyCo-venv-P3.8) 15:59 ~ (main)$

which again in the browser I get:

Something went wrong :-(
Something went wrong while trying to load this website; please try again later.

If it is your site, you should check your logs to determine what the problem is.

There was an error loading your PythonAnywhere-hosted site. There may be a bug in your code.

Error code: Unhandled Exception

Debugging tips
The first place to look is at your web app page to ensure that there are no errors indicated there.
Next, check your site's server and error logs for any messages — you can view them here:
www.panycompany.com.error.log
www.panycompany.com.server.log
You can find helpful tips on the PythonAnywhere help site:
There's an ImportError in the logs
"403 Forbidden" error or "Connection Refused" error in logs
Database connection errors
There are many more helpful guides on our Help pages
If you get completely stuck, then drop us a line at liveusercare@pythonanywhere.com, in the forums, or using the "Send feedback" link on the site, with the relevant lines from your logs.

in the Error logs I get:

2023-08-12 16:16:41,468: ***************************************************
2023-08-12 16:16:41,468: If you're seeing an import error and don't know why,
2023-08-12 16:16:41,468: we have a dedicated help page to help you debug: 
2023-08-12 16:16:41,468: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-12 16:16:41,468: ***************************************************
2023-08-12 16:16:43,630: Error running WSGI application
2023-08-12 16:16:43,639: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
2023-08-12 16:16:43,639: Did you install mysqlclient?
2023-08-12 16:16:43,639:   File "/var/www/www_panycompany_com_wsgi.py", line 16, in <module>
2023-08-12 16:16:43,639:     application = get_wsgi_application()
2023-08-12 16:16:43,639: 
2023-08-12 16:16:43,640:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2023-08-12 16:16:43,640:     django.setup(set_prefix=False)
2023-08-12 16:16:43,640: 
2023-08-12 16:16:43,640:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2023-08-12 16:16:43,640:     apps.populate(settings.INSTALLED_APPS)
2023-08-12 16:16:43,640: 
2023-08-12 16:16:43,641:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
2023-08-12 16:16:43,641:     app_config.import_models()
2023-08-12 16:16:43,641: 
2023-08-12 16:16:43,641:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
2023-08-12 16:16:43,641:     self.models_module = import_module(models_module_name)
2023-08-12 16:16:43,641: 
2023-08-12 16:16:43,642:   File "/home/PanyCompany/pany01/mywebsite/website/models.py", line 12, in <module>
2023-08-12 16:16:43,642:     class Brand(models.Model):
2023-08-12 16:16:43,642: 
2023-08-12 16:16:43,642:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 122, in __new__
2023-08-12 16:16:43,642:     new_class.add_to_class('_meta', Options(meta, app_label))
2023-08-12 16:16:43,642: 
2023-08-12 16:16:43,643:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
2023-08-12 16:16:43,643:     value.contribute_to_class(cls, name)
2023-08-12 16:16:43,643: 
2023-08-12 16:16:43,643:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
2023-08-12 16:16:43,643:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
2023-08-12 16:16:43,643: 
2023-08-12 16:16:43,643:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 15, in __getattr__
2023-08-12 16:16:43,644:     return getattr(self._connections[self._alias], item)
2023-08-12 16:16:43,644: 
2023-08-12 16:16:43,644:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 62, in __getitem__
2023-08-12 16:16:43,644:     conn = self.create_connection(alias)
2023-08-12 16:16:43,644: 
2023-08-12 16:16:43,644:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
2023-08-12 16:16:43,644:     backend = load_backend(db['ENGINE'])
2023-08-12 16:16:43,645: 
2023-08-12 16:16:43,645:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
2023-08-12 16:16:43,645:     return import_module('%s.base' % backend_name)
2023-08-12 16:16:43,645: 
2023-08-12 16:16:43,645:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
2023-08-12 16:16:43,645:     raise ImproperlyConfigured(
2023-08-12 16:16:43,646: ***************************************************
2023-08-12 16:16:43,646: If you're seeing an import error and don't know why,
2023-08-12 16:16:43,646: we have a dedicated help page to help you debug: 
2023-08-12 16:16:43,646: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-12 16:16:43,646: ***************************************************
2023-08-12 16:16:44,411: Error running WSGI application
2023-08-12 16:16:44,411: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
2023-08-12 16:16:44,412: Did you install mysqlclient?
2023-08-12 16:16:44,412:   File "/var/www/www_panycompany_com_wsgi.py", line 16, in <module>
2023-08-12 16:16:44,412:     application = get_wsgi_application()
2023-08-12 16:16:44,412: 
2023-08-12 16:16:44,412:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2023-08-12 16:16:44,412:     django.setup(set_prefix=False)
2023-08-12 16:16:44,412: 
2023-08-12 16:16:44,412:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2023-08-12 16:16:44,413:     apps.populate(settings.INSTALLED_APPS)
2023-08-12 16:16:44,413: 
2023-08-12 16:16:44,413:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
2023-08-12 16:16:44,413:     app_config.import_models()
2023-08-12 16:16:44,413: 
2023-08-12 16:16:44,413:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
2023-08-12 16:16:44,413:     self.models_module = import_module(models_module_name)
2023-08-12 16:16:44,413: 
2023-08-12 16:16:44,414:   File "/home/PanyCompany/pany01/mywebsite/website/models.py", line 12, in <module>
2023-08-12 16:16:44,414:     class Brand(models.Model):
2023-08-12 16:16:44,414: 
2023-08-12 16:16:44,414:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 122, in __new__
2023-08-12 16:16:44,414:     new_class.add_to_class('_meta', Options(meta, app_label))
2023-08-12 16:16:44,414: 
2023-08-12 16:16:44,414:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
2023-08-12 16:16:44,414:     value.contribute_to_class(cls, name)
2023-08-12 16:16:44,415: 
2023-08-12 16:16:44,415:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
2023-08-12 16:16:44,415:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
2023-08-12 16:16:44,415: 
2023-08-12 16:16:44,415:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 15, in __getattr__
2023-08-12 16:16:44,415:     return getattr(self._connections[self._alias], item)
2023-08-12 16:16:44,415: 
2023-08-12 16:16:44,415:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/utils/connection.py", line 62, in __getitem__
2023-08-12 16:16:44,416:     conn = self.create_connection(alias)
2023-08-12 16:16:44,416: 
2023-08-12 16:16:44,416:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
2023-08-12 16:16:44,416:     backend = load_backend(db['ENGINE'])
2023-08-12 16:16:44,416: 
2023-08-12 16:16:44,416:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
2023-08-12 16:16:44,416:     return import_module('%s.base' % backend_name)
2023-08-12 16:16:44,416: 
2023-08-12 16:16:44,416:   File "/home/PanyCompany/.virtualenvs/PanyCo-venv-P3.8/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
2023-08-12 16:16:44,417:     raise ImproperlyConfigured(
2023-08-12 16:16:44,417: ***************************************************
2023-08-12 16:16:44,417: If you're seeing an import error and don't know why,
2023-08-12 16:16:44,417: we have a dedicated help page to help you debug: 
2023-08-12 16:16:44,417: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-08-12 16:16:44,417: ***************************************************

Thanks.

and also after changing the system image to the old one but with the new virtualenv the website works.