Ubuntu is based on Debian, so I don’t know if there’s any advantage swapping the OS. Maybe post the specific error you are getting on python3/erpnext/debian and see if anyone can assist you with that. Otherwise, why not just upgrade from debian 7.3 to 9.x/10.x?