简体   繁体   中英

How to tell pip to keep the most updated version of a lib when installing?

my requirements.txt :

google-api-python-client>=1.6.2
httplib2==0.9.2
...

In this case google-api-python-client installs the httplib2=0.14.0 . But I would be overwritten to the older version on the next line.

Of course, in this case, I could act. But there are some cases that a lib depends on another, that depends on another, etc. So I'm wondering whether there's a way to tell pip to always keep the most recent version of the libs.

like: pip install -r --keep-most-recent requirements.txt

This would mean that pip should install the latest version of the requirements and their dependencies no matter what the version constraints in requirements.txt are, is that right? Impossible as far as I know.

Not sure exactly what you are trying to achieve but maybe you would prefer working with one of these tools:

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