Python 无法使用pipenv安装通道(django)

Python 无法使用pipenv安装通道(django),python,django,django-channels,pipenv,Python,Django,Django Channels,Pipenv,当我尝试使用pipenv安装时,它失败了,据说是因为它在中找不到“zope接口”版本4.5.0 $pipenv安装通道 正在安装频道… 查看索引:https://pypi.python.org/simple 收集渠道 使用缓存https://files.pythonhosted.org/packages/e3/ea/65e947afe102b1b5798f6890479426e8f481df0ec7a4cbba21bdd2897ef9/channels-2.1.3-py2.py3-none-an

当我尝试使用pipenv安装时,它失败了,据说是因为它在中找不到“zope接口”版本4.5.0

$pipenv安装通道
正在安装频道…
查看索引:https://pypi.python.org/simple
收集渠道
使用缓存https://files.pythonhosted.org/packages/e3/ea/65e947afe102b1b5798f6890479426e8f481df0ec7a4cbba21bdd2897ef9/channels-2.1.3-py2.py3-none-any.whl
已满足要求,跳过升级:Django>=1.11 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自通道)(2.1.2)
已满足要求,跳过升级:asgiref~=2.3 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自通道)(2.3.2)
已满足要求,跳过升级:daphne~=2.2 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自通道)(2.2.2)
已满足要求,跳过升级:pytz in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自Django>=1.11->channels)(2018.5)
已满足要求,跳过升级:异步超时=2.0 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自asgiref~=2.3->channels)(3.0.1)
已满足要求,跳过升级:autobahn>=0.18 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自daphne~=2.2->channels)(18.9.2)
已满足要求,跳过升级:twisted>=18.7 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自daphne~=2.2->channels)(18.7.0)
已满足要求,跳过升级:txaio>=18.8.1 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自高速公路>=0.18->daphne~=2.2->channels)(18.8.1)
已满足要求,跳过升级:六个>=1.11.0 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自高速公路>=0.18->daphne~=2.2->channels)(1.11.0)
已满足要求,跳过升级:PyHamcrest>=1.9.0 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自twisted>=18.7->daphne~=2.2->channels)(1.9.0)
已满足要求,跳过升级:zope.interface>=4.4.2 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自twisted>=18.7->daphne~=2.2->channels)(4.5.0)
已满足要求,跳过升级:hyperlink>=17.1.1 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自twisted>=18.7->daphne~=2.2->频道)(18.0.0)
已满足要求,跳过升级:attrs>=17.4.0 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自twisted>=18.7->daphne~=2.2->频道)(18.2.0)
已满足要求,跳过升级:增量>=16.10.1 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自twisted>=18.7->daphne~=2.2->频道)(17.5.0)
已满足要求,跳过升级:Automat>=0.3.0 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自twisted>=18.7->daphne~=2.2->channels)(0.7.0)
已满足要求,跳过升级:持续>=15.1 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自twisted>=18.7->daphne~=2.2->频道)(15.1.0)
已满足要求,跳过升级:setuptools in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自PyHamcrest>=1.9.0->twisted>=18.7->daphne~=2.2->channels)(40.4.3)
已满足要求,跳过升级:idna>=2.5 in/home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages(来自hyperlink>=17.1.1->twisted>=18.7->daphne~=2.2->频道)(2.7)
安装收集的软件包:通道
已成功安装通道-2.1.3
正在向Pipfile的[packages]添加频道…
Pipfile.lock(bd0b0a)已过期,正在更新为(7cafae)…
正在锁定[开发包]依赖项…
正在锁定[程序包]依赖项…
更新了Pipfile.lock(bd0b0a)!
正在从Pipfile.lock(bd0b0a)安装依赖项…

这个问题似乎已经自行解决了。我执行了以下步骤:

  • $pipenv运行pip安装通道
  • 在PIP文件中手动放置一行,
    channels=“*”
  • $pipenv锁
  • 但我不认为这是真正解决问题的方法--现在如果我只是跑

    …它也工作得很好,这是以前从未发生过的。也许旧的缓存版本的存在某种问题


    使用pipenv版本2018.10.9、pip版本18.1和python 3.6.6。

    显然这是pip的问题:啊哈,感谢您找到@Karlis!我已经接受了这个答案,但如果这对你有关系,请随意将此作为答案发布,我会接受。
    $ pipenv install channels
    Installing channels…
    Looking in indexes: https://pypi.python.org/simple
    Collecting channels
      Using cached https://files.pythonhosted.org/packages/e3/ea/65e947afe102b1b5798f6890479426e8f481df0ec7a4cbba21bdd2897ef9/channels-2.1.3-py2.py3-none-any.whl
    Requirement already satisfied, skipping upgrade: Django>=1.11 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from channels) (2.1.2)
    Requirement already satisfied, skipping upgrade: asgiref~=2.3 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from channels) (2.3.2)
    Requirement already satisfied, skipping upgrade: daphne~=2.2 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from channels) (2.2.2)
    Requirement already satisfied, skipping upgrade: pytz in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from Django>=1.11->channels) (2018.5)
    Requirement already satisfied, skipping upgrade: async-timeout<4.0,>=2.0 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from asgiref~=2.3->channels) (3.0.1)
    Requirement already satisfied, skipping upgrade: autobahn>=0.18 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from daphne~=2.2->channels) (18.9.2)
    Requirement already satisfied, skipping upgrade: twisted>=18.7 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from daphne~=2.2->channels) (18.7.0)
    Requirement already satisfied, skipping upgrade: txaio>=18.8.1 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from autobahn>=0.18->daphne~=2.2->channels) (18.8.1)
    Requirement already satisfied, skipping upgrade: six>=1.11.0 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from autobahn>=0.18->daphne~=2.2->channels) (1.11.0)
    Requirement already satisfied, skipping upgrade: PyHamcrest>=1.9.0 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from twisted>=18.7->daphne~=2.2->channels) (1.9.0)
    Requirement already satisfied, skipping upgrade: zope.interface>=4.4.2 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from twisted>=18.7->daphne~=2.2->channels) (4.5.0)
    Requirement already satisfied, skipping upgrade: hyperlink>=17.1.1 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from twisted>=18.7->daphne~=2.2->channels) (18.0.0)
    Requirement already satisfied, skipping upgrade: attrs>=17.4.0 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from twisted>=18.7->daphne~=2.2->channels) (18.2.0)
    Requirement already satisfied, skipping upgrade: incremental>=16.10.1 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from twisted>=18.7->daphne~=2.2->channels) (17.5.0)
    Requirement already satisfied, skipping upgrade: Automat>=0.3.0 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from twisted>=18.7->daphne~=2.2->channels) (0.7.0)
    Requirement already satisfied, skipping upgrade: constantly>=15.1 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from twisted>=18.7->daphne~=2.2->channels) (15.1.0)
    Requirement already satisfied, skipping upgrade: setuptools in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from PyHamcrest>=1.9.0->twisted>=18.7->daphne~=2.2->channels) (40.4.3)
    Requirement already satisfied, skipping upgrade: idna>=2.5 in /home/dan/.local/share/virtualenvs/gmtools-QMaEj5K6/lib/python3.6/site-packages (from hyperlink>=17.1.1->twisted>=18.7->daphne~=2.2->channels) (2.7)
    Installing collected packages: channels
    Successfully installed channels-2.1.3
    
    Adding channels to Pipfile's [packages]…
    Pipfile.lock (bd0b0a) out of date, updating to (7cafae)…
    Locking [dev-packages] dependencies…
    Locking [packages] dependencies…
    Updated Pipfile.lock (bd0b0a)!
    Installing dependencies from Pipfile.lock (bd0b0a)…
      This problem has seemingly resolved itself. I did the following steps:

    1. $ pipenv run pip install channels
    2. Manually put a line in your Pipfile,
      channels="*"
    3. $ pipenv lock
    But I don't think this is what actually solved the problem -- now if I just run...

    $ pipenv uninstall channels
    $ pipenv install channels