我有一个包含一些git+引用的requirements.txt文件。出于某些原因,我希望总是重新安装这些程序,即使我做了更改并升级了版本并将其推送到我的github代码库,pip说已经满足了要求,但没有安装。
这是我的requirements.txt文件的一部分:
Django==1.10
git+https://github.com/myaccount/myrepo.git@master#egg=some_egg
我不想重新安装requirements.txt文件中的所有内容。只有git+要求。
我试过了:
git+https://github.com/myaccount/myrepo.git@master#egg=some_egg --install-option="--upgrade --ignore-installed --force-reinstall"
但上述选项都不起作用。
发布于 2018-06-01 06:50:26
问题是你还没有建议pip
你在git中有什么版本:
git+https://github.com/myaccount/myrepo.git@master#egg=some_egg
对于VCS,pip
不会查看存储库来查找版本,它只会查看URL:
git+https://github.com/myaccount/myrepo.git@master#egg=some_egg-version
示例:
git+https://github.com/myaccount/myrepo.git@master#egg=package-1.0.8
当你向Github推送一个新版本时,用新版本更新你的requirements.txt
并运行pip install -r requirements.txt -U
。
发布于 2019-10-01 20:08:23
可能的一种选择是在可编辑模式下安装软件包,例如
Django==1.10
-e git+https://github.com/myaccount/myrepo.git@master#egg=some_egg
发布于 2018-05-31 15:11:14
我使用的是:
pip install -r requirements.txt
你可以使用一些更像这样的东西:
pip install -r requirements.txt --no-index --find-links
--no-index
-忽略包索引(只查看--查找-链接URL)。
-f
,--find-links <URL>
-如果是指向html文件的URL或路径,则解析到归档的链接
https://stackoverflow.com/questions/50616566
复制相似问题