如何使用pip和需求文件升级特定的包? [英] How can I upgrade specific packages using pip and a requirements file?
问题描述
源在`< virtualenv`> / build / Django中,版本1.2.3与Django == 1.2.4(从-r要求/ apps.txt(第3行))冲突
将需求文件中的Django版本号从1.2.3更新为1.2.4。我正在使用这个命令实际进行升级:
pip --install --upgrade -E`< virtualenv dir `> - 要求`< requirements file`>
我找不到任何触发整个软件包重新下载的标志。我甚至尝试先运行卸载命令,然后安装,但没有骰子。也许我错过了什么?
我不知道这是否是你的问题,但在我的情况下,不能将Django升级到1.2.4 - 我总是用1.2.3版本完成,所以我卸载了Django:
< virtualenv> / bin / pip卸载Django
然后我删除了 ; virtualenv> / build / Django
目录,最后我安装了正确的版本:
virtualenv> / bin / pip安装Django
希望这将有所帮助。
I'm using pip with a requirements file, in a virtualenv, for my Django projects. I'm trying to upgrade some packages, notably Django itself, and I'm getting an error about source code conflicts:
Source in `<virtualenv`>/build/Django has version 1.2.3 that conflicts with Django==1.2.4 (from -r requirements/apps.txt (line 3))
That's after updating the version number of Django from 1.2.3 to 1.2.4 in my requirements file. I'm using this command to actually do the upgrade:
pip --install --upgrade -E `<virtualenv dir`> --requirement `<requirements file`>
I can't find any flag that triggers a total package re-download. I even tried running an uninstall command first, then the install but no dice. Maybe I'm missing something?
I'm not sure if it's exactly your problem, but in my case, I wasn't able to upgrade Django to 1.2.4 - I was always finishing with 1.2.3 version, so I uninstalled Django with:
<virtualenv>/bin/pip uninstall Django
Then I removed <virtualenv>/build/Django
directory and finally I installed the proper version with:
<virtualenv>/bin/pip install Django
Hope this will help.
这篇关于如何使用pip和需求文件升级特定的包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!