2

When I install all the requirements from a foreign requirements.txt file containing outdated pinned versions it frequently ends up in some trouble caused by incompatibilities introduced in later python versions.

Therefore I'm searching for a way to ignore such pinned versions and still install the requirements from the requirements file.

Is there some pip install option or some other trick to obtain this to avoid manually and tediously removing the pinned versions from the requirements file? One of the goals is to be able to test if the code still works with more recent requirements without changing something.

click==8.1.3
Flask==2.1.2
flask-talisman==1.0.0
gunicorn==20.1.0
importlib-metadata==4.12.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
pkg_resources==0.0.0
pyserial==3.5
waitress==2.1.2
Werkzeug==2.1.2
zipp==3.8.0
  • 2
    You can do `pip install --ignore-installed -r requirements.txt` to ignore the requirements file packages But the entire point of having requirements file is to freeze the packages so that the build don't break due to versioning. Don't forget to freeze again only once you have a working build. – Raj Verma Jun 28 '22 at 10:35
  • Yeah @RajVerma this will work and use Pyenv or Conda to seperate environments. – Ameya Jun 28 '22 at 10:46
  • The point about the freezed versions is that it works on the developers machine. However, if you checkout a copy on another machine, because you need the code for something else, it is really luck that it works out-of-the-box with the pinned versions. This is complicated by the fact that often no one can tell you the exact configuration of the developers machine. – Wör Du Schnaffzig Jun 28 '22 at 14:55

0 Answers0