问题描述
群晖用 postgres 对应的python脚本,有时会需要使用 psycopg2这个数据库驱动模块,pip 或 pip3 或 conda 安装的时候报错,
pip install psycopg2
status 1: python setup.py egg_info Check the logs for full command
output.
错误类似如下:
Collecting psycopg2
Using cached psycopg2-2.8.6.tar.gz (383 kB)
ERROR: Command errored out with exit status 1:
command: /var/services/homes/gjsr/anaconda3/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r7qfnnt5/psycopg2_0734c79fa1ed4a8caa34b74a0dae95c1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r7qfnnt5/psycopg2_0734c79fa1ed4a8caa34b74a0dae95c1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"