"ImportError: No module named premailer" after updating to Frappe v8.7.7

I recenty updated to the latest version of frappe and everything else works fine, but my custom server side email script which used to work fine doesn’t work after the update.

Here is the error that I am getting:

  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 56, in application
    response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 52, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 922, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/egov_af/egov_af/api.py", line 23, in send_notification_emails
    reference_name=meeting.name
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 432, in sendmail
    inline_images=inline_images, header=header)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 104, in send
    unsubscribe_link=unsubscribe_link)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/email_body.py", line 256, in get_formatted_html
    html = inline_style_in_html(html)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/email_body.py", line 272, in inline_style_in_html
    from premailer import Premailer
ImportError: No module named premailer```

I installed premailer too using `pip install premailer` but the error still appears.

Here is my server side script in api.py:

def send_notification_emails(meeting):
        meeting = frappe.get_doc("Meeting", meeting)
        meeting.check_permission("email")

        frappe.sendmail(
                recipients=[p.email for p in meeting.participants],
                subject=meeting.subject,
                sender=frappe.session.user,
                message=meeting.message,
                reference_doctype=meeting.doctype,
                reference_name=meeting.name
        )

        meeting.add_comment("Comment", meeting.status + ": email sent to meeting participants.")
        frappe.msgprint(_("Notification emails sent to all the participants."))

use /env/pip install premailer from frappe-bench directory or you can run the bench update --requirements to install all the requirements

./env/bin/pip install premailer says:

Requirement already satisfied: premailer in ./env/lib/python2.7/site-packages
Requirement already satisfied: requests in ./env/lib/python2.7/site-packages (from premailer)
Requirement already satisfied: cssselect in ./env/lib/python2.7/site-packages (from premailer)
Requirement already satisfied: lxml in ./env/lib/python2.7/site-packages (from premailer)
Requirement already satisfied: cssutils in ./env/lib/python2.7/site-packages (from premailer)
Requirement already satisfied: idna<2.6,>=2.5 in ./env/lib/python2.7/site-packages (from requests->premailer)
Requirement already satisfied: urllib3<1.22,>=1.21.1 in ./env/lib/python2.7/site-packages (from requests->premailer)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./env/lib/python2.7/site-packages (from requests->premailer)
Requirement already satisfied: certifi>=2017.4.17 in ./env/lib/python2.7/site-packages (from requests->premailer)

bench update --requirements say:

sudo: no tty present and no askpass program specified
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/.bench/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/.bench/bench/commands/update.py", line 62, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force, reset=reset)
  File "/home/frappe/.bench/bench/commands/update.py", line 104, in _update
    restart_supervisor_processes(bench_path=bench_path)
  File "/home/frappe/.bench/bench/utils.py", line 361, in restart_supervisor_processes
    supervisor_status = subprocess.check_output(['sudo', 'supervisorctl', 'status'], cwd=bench_path)
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['sudo', 'supervisorctl', 'status']' returned non-zero exit status 1