Collecting psycopg2 Using cached psycopg2-2.8.5.tar.gz (380 kB)
ERROR: Command errored out with exit status 1: command: /home/ubuntu/egrdb/env/bin/python -c 'import sys, setuptools, tokenize; sys.argv0 = '"'"'/tmp/pip-install-gn70jweq/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-gn70jweq/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-4tr67ll8 cwd: /tmp/pip-install-gn70jweq/psycopg2/ Complete output (7 lines): running egg_info creating /tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info writing /tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info/dependency_links.txt writing top-level names to /tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info/SOURCES.txt' Error: b'You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.\n'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
答案 0 :(得分:1)
如果要安装源版本psycopg2-2.8.5.tar.gz,则需要按照@Chris的说明进行操作。不过,最简单的方法是:
pip install psycopg2-binary
然后您将获得一个预编译的版本,并且不需要-dev软件包。