package.json & requirements.txt Viewer · Tutorial
How to check a requirements.txt for unpinned packages
5 min readbeginnerUpdated
Your Python app installed fine last month, but a fresh install today breaks. Usually a dependency without a version limit moved to a new major release. You will find those lines and decide how to pin them.
What you need
- The requirements.txt Viewer
- Your requirements.txt
Steps
Paste the file
Load the example. Each line becomes a row with its version rule in words, such as “Compatible with 23.0” for
gunicorn~=23.0.Find unpinned packages
requestshas no version at all and is marked Not pinned. Any release can be installed.Find open ranges
djangorestframework>=3.15is marked No upper limit. Add a ceiling, or use the compatible release operator.requests>=2.32,<3 djangorestframework~=3.15Check markers and Git sources
pandasis only installed on Python 3.10 and later, shown in the notes.internal-utilscomes from Git at tag v1.4, so it is fixed but outside PyPI.
Try it yourself
Opens the package.json & requirements.txt Viewer with this tutorial's sample loaded.
Common mistakes
- Pinning by hand forever
- Tools such as pip-tools or uv can write a fully pinned lock file from loose requirements. Keep ranges in one file and exact versions in the generated one.
- Forgetting included files
-r requirements-base.txtpulls in another file. Check that one too.
Next steps
Go back to the package.json & requirements.txt Viewer, or keep going with one of these: