I am working on a project for one of my lectures and I need to download the package psycopg2 in order to work with the postgresql database in use. Unfortunately, when I try
It looks like the openssl package is not installed. Try installing it and pip install again. I'm not a macos user, but I believe that brew simplifies package management on that platform.
You might also need to install the Python development and postgresql development packages.