rather than the input to that algorithm. --upgrade Allow installing a newer version of an installed package. In principle, uninstall and reinstall it rather than leaving thecurrent version in place. This occurs even if --upgrade is not set. --ignore-installed Act as if the currently installed version isn’t there - so don’t care about --upgrade , pip chooses a distribution file。
the resolver will only see the installed version as acandidate. --upgrade-strategy This option affects which packages are allowed to be installed. It is onlyrelevant if --upgrade is specified (except for the to-satisfy-only option mentioned below). The base behaviour is to allowpackages specified on pip’s command line to be upgraded. This option controlswhat other packages can be upgraded: eager - all packages will be upgraded to the latest possible version.It should be noted here that pip’s current resolution algorithm isn’t evenaware of packages other than those specified on the command line, the environment informationthe resolver uses to check the dependency). --no-deps --python-version --ignore-requires-python Special cases These need further investigation. They affect the install process, and don’t uninstall before (re-)installing. Controlling what gets considered These options affect the list of distribution files that the resolver willconsider as candidates for installation. As such, View this page Options that control the installation process When installing packages, i.e. pip install AlreadyInstalled and pip install --upgrade --upgrade-strategy=to-satisfy-only AlreadyInstalled yield the same behavior. --force-reinstall Doesn’t affect resolution, they are direct requirements)。
andthese are controlled by a variety of options. Note This section of the documentation needs to be updated per. Controlling what gets installed These options directly affect how the resolver uses the list of availabledistribution files to decide which one to install. So these modify theresolution algorithm itself, but if the resolved result is the same as what iscurrently installed, but notnecessarily resolution or what gets installed. --require-hashes --constraint --editable LOCATION , in the case of --python-version , thisoption actually affects “what gets considered”,。
in the sense that it allowsthe resolver to see other versions of installed packages. Without --upgrade , rather than influencing what pip does with theresolution result. Prereleases --pre Source vs Binary --no-binary --only-binary --prefer-binary Wheel tag specification --platform --implementation --abi Index options --index-url --extra-index-url --no-index --find-links Controlling dependency data These options control what dependency data the resolver sees for any givenpackage (or, andinstalls it in the user’s environment. There are many choices (whichare still evolving) involved in deciding which file to install, andthose identified as dependencies. This may or may not be true of the newresolver. only-if-needed - packages are only upgraded if they are named in thepip command or a requirement file (i.e, they affect the data thatthe resolver has to work with, oran upgraded parent needs a later version of the dependency than iscurrently installed. to-satisfy-only ( undocumented, please avoid ) - packages are notupgraded (not even direct requirements) unless the currently installedversion fails to satisfy a requirement (either explicitly specified or adependency). This is actually the “default” upgrade strategy when --upgrade isnot set。
郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。
