gpt4 book ai didi

python - 带有 URL 的 pip -U -r requirements.txt 不断重新安装

转载 作者:太空狗 更新时间:2023-10-29 21:46:25 24 4
gpt4 key购买 nike

我正在使用 Django 的测试版,下载页面建议使用 URL。

requirements.txt 条目只是 URL:

https://www.djangoproject.com/download/1.7b3/tarball/

当我运行 pip install -U -r requirements.txt 时,它总是会重新安装 Django。有没有办法在 requirements.txt 行中指定版本,例如...tarball/#egg=Django==1.7b3?

我喜欢在开发时每个包都是最新版本,所以我使用-U

也许有更好的解决方法?

最佳答案

您应该尝试将这些行之一添加到您的 requirements.txt

-e https://github.com/django/django.git#egg=django

也指向具体的commit

-e https://github.com/django/django.git@b8d255071ead897cf68120cd2fae7c91326ca2cc#egg=django

或标签

-e git+https://github.com/django/django.git@1.7b3

阅读pip's documentation还有很多其他的例子

关于python - 带有 URL 的 pip -U -r requirements.txt 不断重新安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23402177/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com