简体   繁体   中英

How to tell package manager (pip) to never replace newer with older version

Is there a way to tell the package manager pip to never replace newer by older versions when installing packages from a requirements.txt ?

Example: I have Robot Framework 3.2.2 and Waitress 1.4.3 installed and my requirements.txt looks like this:

...
robotframework==3.0.2
waitress==1.4.4
...

Hence, I would only want the waitress requirement to be refreshed. The reason is that I need to automate the installation of dependencies via requirement files and can't just change their content.

You could use >= to tell pip to install newer versions, or that version.

For example:

robotframework>=3.0.2
waitress>=1.4.4

Would tell pip to install any version that is at least 3.0.2 for robotframework, and at least 1.4.4 for waitress.

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