【问题标题】:Django Channels pip install failsDjango 频道 pip 安装失败
【发布时间】:2018-06-24 13:10:25
【问题描述】:

在 Centos7 上运行 pip install -U channels 命令时出现以下错误:

Could not find a version that satisfies the requirement twisted>=17.5 (from daphne~=2.2->channels) (from versions: )
No matching distribution found for twisted>=17.5 (from daphne~=2.2->channels)

我的本​​地主机中有一个虚拟环境,我正在尝试从我的 requirements.txt 文件中安装所有依赖项。 pip freeze 给出以下输出:

aioredis==1.1.0
asgiref==2.3.2
asn1crypto==0.24.0
async-timeout==2.0.1
attrs==17.4.0
autobahn==18.4.1
Automat==0.6.0
cffi==1.11.5
configparser==3.5.0
constantly==15.1.0
cryptography==2.2.2
Django==2.0.2
django-bootstrap3==9.1.0
django-modalview==0.1.5
h2==3.0.1
hiredis==0.2.0
hpack==3.0.0
hyperframe==5.1.0
hyperlink==18.0.0
idna==2.6
incremental==17.5.0
msgpack==0.5.6
msgpack-python==0.5.6
Pillow==5.0.0
priority==1.3.0
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycparser==2.18
PyMySQL==0.8.1
pyOpenSSL==17.5.0
pytz==2018.3
redis==2.10.6
service-identity==17.0.0
six==1.11.0
txaio==2.10.0
zope.interface==4.4.3

【问题讨论】:

  • 你的pip版本是多少,试过了吗pip install pip -U
  • 你能发布有问题的python版本吗?

标签: django centos7 channels


【解决方案1】:

我将假设您使用的是 python 3.5+,因为 channels v2 包需要 python 3.5+ 版才能运行。

我在 Centos7 和我从源代码编译的本地安装的 python3.6 上遇到了同样的问题。结果我没有安装 bz2 库包。 这是导致我找到此解决方案的答案:https://stackoverflow.com/a/30766325/6581384

对于 centos 7,我只需将答案中的第一个命令替换为以下命令: $ sudo yum install bzip2 bzip2-libs bzip2-devel

【讨论】:

    猜你喜欢
    • 2018-10-12
    • 2014-09-07
    • 2018-10-23
    • 1970-01-01
    • 2016-09-25
    • 2021-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多