简体   繁体   中英

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.

似乎有一个突出的错误: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM