安装psycopg2 == 2.8.1时出错

问题描述 投票:2回答:2

非常全新,并尝试从tut中学习,我正在尝试为Flask构建安装依赖项并在终端上收到错误

我有以下安装

pipenv install flask flask-sqlalchemy psycopg2 flask-migrate flask-script marshmallow flask-bcrypt pyjwt

我检查了Python,PostSQL,pipenv已安装并出现以下错误

An error occurred while installing psycopg2==2.8.1 --hash=sha256:3648afc2b4828a6e00d516d2d09a260edd2c1e3de1e0d41d99c5ab004a73d180 --hash=sha256:5329b4530e31f58e0eafc55e26bbef684509bcc3be41604e45c0b98c297dc722 --hash=sha256:7c1ae1669d11105a002f804bebd7432f8dc7473459aa405164c6b44a922decd5 --hash=sha256:8af13498e32a00d0a66e43b7491c15231b27ab964ee4d2277a4a2dbadfb2c482 --hash=sha256:9d5489867bd5f6d6c6191a4debd8de9a5c03a9608cce3f4d7133e29e6bd4ec27 --hash=sha256:a17bfc9faffcca0ad9360c1ad97ab61ede583aa954715e8e436ffd80046661ff --hash=sha256:b4a475ce87eabc0607e068a3c704d0aa0820237ed78d493b8e2d880eb73cd7fe --hash=sha256:c49d66e97affdc80d084b3b363f09f17db621418f0b8e0524b06c54959e2094d --hash=sha256:d13fbc3d533656cfdf094e13c1b0f40917b72813755ba780971ba0ce04280ac4 --hash=sha256:e1e4fe6e8ab9f9c7d28514d007f623999d2dd6b5b81069dd4f9d30dbdd6f7069 --hash=sha256:e67d60cb1a32f5fd8fcea935cf9efb1d1c26f96203b0ca2ae98c4c40ef8d8eac! Will try again.
python psycopg2 pipenv
2个回答
2
投票

安装psycopg2-binary而不是psycopg2


1
投票

您需要先安装以下编译器:

sudo apt-get install libpq-dev
© www.soinside.com 2019 - 2024. All rights reserved.