开发者

Using Pip, how do I force upgrade non-upgraded packages only?

When running Pip with a requirements.txt file which has fixed versions, we get the following error (or similar)开发者_开发技巧:

VersionConflict: (solrpy 0.9.1 
(.../lib/python2.6/site-packages/solrpy-0.9.1-py2.6.egg),
    Requirement.parse('solrpy==0.9.3'))

because the version conflicts. Using pip install -U -r requirements.txt fixes this, but it also forces us to download all the packages again. One of the nice things about Pip is that it will know what's installed and not re-download/install it.

Is there any way around this? I guess what I want is a "soft upgrade", where it only upgrades the packages if they conflict.


Seems there is an outstanding bug for this: http://bitbucket.org/ianb/pip/issue/13/


Upgrade the solrpy package separately:

pip install -U --no-deps solrpy

I think you can probably omit the --no-deps parameter, but you might want to try this first, and the former second, if you have problems:

pip install -U solrpy

I don't believe there is a way to just update higher versioned packaged already installed from a requirements.txt file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜