【问题标题】:Error while running pip install -r requirements.txt , Could not find a version that satisfies the requirement django-filters==2.4.0运行 pip install -r requirements.txt 时出错,找不到满足要求的版本 django-filters==2.4.0
【发布时间】:2021-03-23 18:47:27
【问题描述】:

这是我尝试在虚拟环境中安装 requirements.txt 时得到的命令行输出。 django-filters 版本似乎有一些错误,但不确定是什么!我很坚持这个,请帮助我。谢谢!

  Using cached asgiref-3.2.7-py2.py3-none-any.whl (19 kB)
Collecting Babel==2.8.0
  Using cached Babel-2.8.0-py2.py3-none-any.whl (8.6 MB)
Collecting dj-database-url==0.5.0
  Using cached dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
Requirement already satisfied: Django==3.0.6 in e:\..\..\venv\lib\site-packages (from -r requirements.txt (line 4)) (3.0.6)
Collecting django-crispy-forms==1.9.0
  Using cached django_crispy_forms-1.9.0-py2.py3-none-any.whl (107 kB)
ERROR: Could not find a version that satisfies the requirement django-filters==2.4.0
ERROR: No matching distribution found for django-filters==2.4.0

【问题讨论】:

  • 你能提供更多关于你在哪个平台上安装它的信息,还有你安装的python版本是什么
  • 这个包叫django-filter,不是django-filterspip install django-filter==2.4.0django-filter==2.4.0 在您的 requirements.txt 中。

标签: python django command-line pip django-filter


【解决方案1】:

此时您的项目中安装了哪个版本的 Django-filters ?如果您没有 2.4.0 版本,则必须卸载 Django-filters 并安装 django-filters 2.4.0 版本

pip install django-filters==2.4.0

【讨论】:

    猜你喜欢
    • 2021-04-30
    • 1970-01-01
    • 2016-12-18
    • 2015-10-13
    • 1970-01-01
    • 2020-10-21
    • 2023-03-12
    • 2021-12-25
    • 2019-01-06
    相关资源
    最近更新 更多