开发者

Why is Pip looking for download cache if the same exact package is already installed, when doing an --upgrade

开发者 https://www.devze.com 2023-03-04 19:40 出处:网络
This is on windows. In the Global Site packages I have installed lxml binary(.egg file) . And now I am creating a virtualenv and trying to get the same egg from the global environment.

This is on windows. In the Global Site packages I have installed lxml binary(.egg file) . And now I am creating a virtualenv and trying to get the same egg from the global environment.

virtualenv.exe mynewvenv
call mynewvenv\Scripts\activate.bat

So "pip freeze" gives me the egg which I installed in my global environment.开发者_Go百科

Now I have a tarball version (source) of the same lxml package(with same name and same version) in the download cache. Now if I run "pip install --upgrade" its actually picking the tarball(source) from the download cache and installing it without checking that the same package is already installed(although as an egg). Why is pip behaving like this ? Ideally Pip should output something like "Requirement already statisfied" and move on. Isn't it ?

Update: Just now found that even "easy_install", is behaving in the same weird way.


When you use pip install --upgrade, it always (re)install the package and its dependencies.

IIRC it is the only way to force reinstallation.

0

精彩评论

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