I got this error when I'm trying to run odoo server
ModuleNotFoundError: No module named 'psycopg2'
so to fix it , I run the commands bellow
sudo apt-get update
sudo apt-get install libpq-dev
sudo pip3 install psycopg2-binary
& for runing odoo 15.0 with python 3.8 we can use
sudo python3.8 -m pip install --upgrade psycopg2-binary