首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在EC2 (CentOS)上安装psycopg 3

无法在EC2 (CentOS)上安装psycopg 3
EN

Stack Overflow用户
提问于 2022-03-03 08:35:07
回答 1查看 445关注 0票数 0

我的工作是:

  • CentOS Linux 7 (Core)
  • Python 3.9.10
  • pip 22.0.3
  • 使用virtualenv,其中pip list
代码语言:javascript
复制
Package    Version
---------- -------
pip        22.0.3
setuptools 60.9.3
wheel      0.37.1

如何安装精神科 (也尝试了sudo和/或pip3 ):

1:

代码语言:javascript
复制
pip install psycopg[binary]
代码语言:javascript
复制
Collecting psycopg[binary]
  Using cached psycopg-3.0.9-py3-none-any.whl (141 kB)
  Using cached psycopg-3.0.8-py3-none-any.whl (142 kB)
  Using cached psycopg-3.0.7-py3-none-any.whl (141 kB)
  Using cached psycopg-3.0.6-py3-none-any.whl (141 kB)
  Using cached psycopg-3.0.5-py3-none-any.whl (141 kB)
  Using cached psycopg-3.0.4-py3-none-any.whl (140 kB)
  Using cached psycopg-3.0.3-py3-none-any.whl (140 kB)
  Using cached psycopg-3.0.2-py3-none-any.whl (140 kB)
  Using cached psycopg-3.0.1-py3-none-any.whl (140 kB)
  Using cached psycopg-3.0-py3-none-any.whl (140 kB)
ERROR: Cannot install psycopg[binary]==3.0, psycopg[binary]==3.0.1, psycopg[binary]==3.0.2, psycopg[binary]==3.0.3, psycopg[binary]==3.0.4, psycopg[binary]==3.0.5, psycopg[binary]==3.0.6, psycopg[binary]==3.0.7, psycopg[binary]==3.0.8 and psycopg[binary]==3.0.9 because these package versions have conflicting dependencies.

The conflict is caused by:
    psycopg[binary] 3.0.9 depends on psycopg-binary==3.0.9; extra == "binary"
    psycopg[binary] 3.0.8 depends on psycopg-binary==3.0.8; extra == "binary"
    psycopg[binary] 3.0.7 depends on psycopg-binary==3.0.7; extra == "binary"
    psycopg[binary] 3.0.6 depends on psycopg-binary==3.0.6; extra == "binary"
    psycopg[binary] 3.0.5 depends on psycopg-binary==3.0.5; extra == "binary"
    psycopg[binary] 3.0.4 depends on psycopg-binary==3.0.4; extra == "binary"
    psycopg[binary] 3.0.3 depends on psycopg-binary==3.0.3; extra == "binary"
    psycopg[binary] 3.0.2 depends on psycopg-binary==3.0.2; extra == "binary"
    psycopg[binary] 3.0.1 depends on psycopg-binary==3.0.1; extra == "binary"
    psycopg[binary] 3.0 depends on psycopg-binary==3.0; extra == "binary"

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

2:

代码语言:javascript
复制
pip install psycopg[binary]==3.0.8
代码语言:javascript
复制
Collecting psycopg[binary]==3.0.8
  Using cached psycopg-3.0.8-py3-none-any.whl (142 kB)
ERROR: Could not find a version that satisfies the requirement psycopg-binary==3.0.8; extra == "binary" (from psycopg[binary]) (from versions: none)
ERROR: No matching distribution found for psycopg-binary==3.0.8; extra == "binary"

3:

代码语言:javascript
复制
pip install psycopg-binary
代码语言:javascript
复制
ERROR: Could not find a version that satisfies the requirement psycopg-binary (from versions: none)
ERROR: No matching distribution found for psycopg-binary

在这里没有任何选择,任何帮助都将不胜感激。它在我的本地机器上工作,但不工作在EC2上。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-03 08:41:23

我用:

代码语言:javascript
复制
pip install psycopg2-binary
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71334162

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档