Skip to content
CodeKruPro

Why pin package versions?

QuizEasy-MediumPython only

Nobody changed the test code, but last night's run fails with a new error from a library. requirements.txt lists selenium with no version. What is the most likely cause and fix?

  • A new library release was installed on the fresh CI agent (the machine that runs the build); pin the versions, which means write down the exact version of each package (for example with pip freeze in an environment that is known to work), and upgrade on purpose
  • pip installs random versions
  • CI agents always use Python 2
  • The test code must have changed

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in