Right, I was referring to the paths in this forum thread: Internal Server error: on Local server setup
For example:
/home/cchq/www/echis/releases/2019-10-26_17.12/python_env-3.6/lib/python3.6/site-packages/psycopg2/__init__ .py
It looked like you had managed to complete the upgrade, sounds like by upgrading to Ubuntu 18.04 first. I wanted to check in here and confirm that this issue is resolved.