title: Building wheels for collected packages: psycopg2
body: <p>I am new to python. I am trying to execute my project but I am encountering some sort of error which is mentioned below while doing <code>pip install -r requirements-local.txt</code></p>
  <p>I created virtual environment using <code>virtualenv -p python3 venv</code> and activated it using <code>source venv/bin/activate</code> command. Then I try to install dependancy using <code>pip install -r requirements-local.txt</code> which throws error</p>
  <p>Some part of the error :</p>
  <pre><code>Building wheels for collected packages: psycopg2
    Building wheel for psycopg2 (setup.py) ... error
  
  and 
  
  Running setup.py install for psycopg2 ... error
      ERROR: Command errored out with exit status 1:
       command: /Users/akshaysalekar/Documents/Projects/lambda-patch-ats/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/private/var/folders/cy/cgz3qm196wg_h0wfdgh4clkr0000gn/T/pip-install-zss21x7x/psycopg2_0948f735c8ed42f6b38b42db053c4168/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/private/var/folders/cy/cgz3qm196wg_h0wfdgh4clkr0000gn/T/pip-install-zss21x7x/psycopg2_0948f735c8ed42f6b38b42db053c4168/setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record /private/var/folders/cy/cgz3qm196wg_h0wfdgh4clkr0000gn/T/pip-record-cmz8fx78/install-record.txt --single-version-externally-managed --compile --install-headers /Users/akshaysalekar/Documents/Projects/lambda-patch-ats/venv/include/site/python3.9/psycopg2
           cwd: /private/var/folders/cy/cgz3qm196wg_h0wfdgh4clkr0000gn/T/pip-install-zss21x7x/psycopg2_0948f735c8ed42f6b38b42db053c4168/
      Complete output (141 lines):```
  
  
  </code></pre>
  <p>I am using Macbook pro (macOS Big Sur). My python version is <code>3.9.6</code> , pip verison is <code>pip 21.2.2</code>.</p>
  <p>My requirement file has only two dependencies which are</p>
  <pre><code>psycopg2==2.7.7 
  boto3==1.9.100
  </code></pre>
  <p>I have tried upgrading outdated package, Installing wheel package and reinstalling python and updating pip but no luck.
  Can someone please help me in this.
  Thank you</p>
  <p>Edit : The complete error message is pasted here;
  <a href="https://pastebin.com/raw/M9viR8fU" rel="nofollow noreferrer">https://pastebin.com/raw/M9viR8fU</a></p>