具体的问题描述:
Using cached psycopg2-2.9.2.tar.gz (380 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [25 lines of output] running egg_info creating /tmp/pip-pip-egg-info-usv74m3i/psycopg2.egg-info writing /tmp/pip-pip-egg-info-usv74m3i/psycopg2.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-usv74m3i/psycopg2.egg-info/dependency_links.txt writing top-level names to /tmp/pip-pip-egg-info-usv74m3i/psycopg2.egg-info/top_level.txt
Using cached psycopg2-2.9.2.tar.gz (380 kB) Preparing metadata (setup.py) ... error
解决方案如下,国内好多文章都非常垃圾,没有一点用处,翻看国外的文章找出来的解决方案.亲测有效.
sudo apt install libpq-dev pip install psycopg2
问题随即解决.