pip-requirements-file-creation
License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution.
Summary
Generate a pinned requirements.txt file that captures exact software dependency versions for a Python project, enabling reproducible environment reconstruction across platforms. This skill is essential when documenting machine learning implementations that depend on specific, incompatible library versions.
When to use
Apply this skill when you have identified all pinned software dependencies for a Python project (typically from README, setup.py, or environment documentation) and need to create a machine-readable artifact that can reliably reconstruct that exact environment. Specifically useful for deep learning or scientific computing projects where minor version mismatches cause incompatibility (e.g., Keras 2.2.0 with TensorFlow 1.8.0 backend).
When NOT to use
- When dependency versions are intentionally flexible or use version ranges (e.g., >=2.0,<3.0) rather than pinned versions — use a different versioning strategy.
- When the project uses non-Python dependencies or C/C++ extensions that require system-level package managers — supplement with additional environment specification formats.
- When the target environment is already containerized (e.g., Docker) — consider whether requirements.txt addition provides value beyond the container specification.
Inputs
- Project README or documentation containing pinned software versions
- Python version specification (e.g., Python 3.6.12)
- List of dependency packages with explicit version numbers
Outputs
- requirements.txt file with format 'package==version' for each dependency
- environment.yml file (Conda format) for cross-platform reproducibility
- Validation report confirming version compatibility
How to apply
Parse the project's documentation (README, setup.py, or supplementary materials) to extract all pinned package names and their exact version numbers. For each dependency, create a single line in requirements.txt using the format 'package==version', listing all eight packages with pinned versions. Validate the requirements.txt syntax and confirm compatibility with the target Python version (e.g., Python 3.6.12) using a dependency resolver tool such as pip-compile or pipdeptree. Finally, generate both requirements.txt (pip) and environment.yml (Conda) formats to maximize reproducibility across different package managers and operating systems.
Related tools
- Python (Runtime environment; version 3.6.12 specified as requirement)
- Keras (Deep learning library dependency; version 2.2.0 pinned)
- TensorFlow (Backend for Keras; version 1.8.0 pinned)
- numpy (Numerical computing dependency; version 1.15.4 pinned)
- scikit-learn (Machine learning library dependency; version 0.23.2 pinned)
- scipy (Scientific computing dependency; version 1.0.0 pinned)
- seaborn (Visualization library dependency; version 0.9.0 pinned)
- Pandas (Data manipulation dependency; version 1.1.1 pinned)
- h5py (HDF5 file format handling dependency; version 2.7.1 pinned)
- pip-compile or pipdeptree (Dependency resolver tool for validating version compatibility)
Evaluation signals
- requirements.txt file exists and contains all nine dependencies (Python 3.6.12 plus eight packages) with format 'package==version'
- Syntax validation passes: no malformed lines, all version specifiers are recognized by pip
- Dependency resolver confirms no version conflicts when installing against Python 3.6.12 target
- environment.yml (Conda format) successfully parses and lists equivalent pinned versions
- Freshly installed environment from requirements.txt produces identical package versions to documented specification
Limitations
- Python 3.6.12 is deprecated and no longer receives security updates; users may encounter platform incompatibility or security vulnerabilities when using this old environment.
- Some pinned versions (e.g., TensorFlow 1.8.0) are incompatible with modern CUDA versions, limiting reproducibility on newer hardware.
- Windows and macOS may have different binary availability for old package versions; platform-specific dependency resolution may fail silently.
Evidence
- [other] The massNet implementation requires Python 3.6.12, Keras 2.2.0 with Tensorflow 1.8.0 backend, and eight pinned dependency packages: numpy 1.15.4, sklearn 0.23.2, scipy 1.0.0, seaborn 0.9.0, Pandas 1.1.1, and h5py 2.7.1.: "Python 3.6.12, Keras 2.2.0 with Tensorflow 1.8.0 backend, and eight pinned dependency packages: numpy 1.15.4, sklearn 0.23.2, scipy 1.0.0, seaborn 0.9.0, Pandas 1.1.1, and h5py 2.7.1"
- [other] Generate a requirements.txt file listing each dependency with its pinned version in the format 'package==version'.: "Generate a requirements.txt file listing each dependency with its pinned version in the format 'package==version'"
- [readme] We have implemented our machine learning model using the following software items: 1- Python(3.6.12) 2- Keras (2.2.0) with a Tensorflow(1.8.0) backend. 3- Packages: numpy(1.15.4), sklearn(0.23.2), scipy(1.0.0), seaborn (0.9.0), Pandas(1.1.1.), and h5py(2.7.1): "Python(3.6.12) 2- Keras (2.2.0) with a Tensorflow(1.8.0) backend. 3- Packages: numpy(1.15.4), sklearn(0.23.2), scipy(1.0.0), seaborn (0.9.0), Pandas(1.1.1.), and h5py(2.7.1)"
- [other] Validate the requirements.txt syntax and confirm all listed versions are compatible with Python 3.6.12 using dependency resolver tools.: "Validate the requirements.txt syntax and confirm all listed versions are compatible with Python 3.6.12 using dependency resolver tools"
- [other] Export environment specification in both requirements.txt and environment.yml (Conda) formats for reproducibility across platforms.: "Export environment specification in both requirements.txt and environment.yml (Conda) formats for reproducibility across platforms"
1---2name: pip-requirements-file-creation3description: Use when you have identified all pinned software dependencies for a Python project (typically from README, setup.py, or environment documentation) and need to create a machine-readable artifact that can reliably reconstruct that exact environment.4license: CC-BY-4.05---67# pip-requirements-file-creation89> **License: restricted** — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->10## Summary1112Generate a pinned requirements.txt file that captures exact software dependency versions for a Python project, enabling reproducible environment reconstruction across platforms. This skill is essential when documenting machine learning implementations that depend on specific, incompatible library versions.1314## When to use1516Apply this skill when you have identified all pinned software dependencies for a Python project (typically from README, setup.py, or environment documentation) and need to create a machine-readable artifact that can reliably reconstruct that exact environment. Specifically useful for deep learning or scientific computing projects where minor version mismatches cause incompatibility (e.g., Keras 2.2.0 with TensorFlow 1.8.0 backend).1718## When NOT to use1920- When dependency versions are intentionally flexible or use version ranges (e.g., >=2.0,<3.0) rather than pinned versions — use a different versioning strategy.21- When the project uses non-Python dependencies or C/C++ extensions that require system-level package managers — supplement with additional environment specification formats.22- When the target environment is already containerized (e.g., Docker) — consider whether requirements.txt addition provides value beyond the container specification.2324## Inputs2526- Project README or documentation containing pinned software versions27- Python version specification (e.g., Python 3.6.12)28- List of dependency packages with explicit version numbers2930## Outputs3132- requirements.txt file with format 'package==version' for each dependency33- environment.yml file (Conda format) for cross-platform reproducibility34- Validation report confirming version compatibility3536## How to apply3738Parse the project's documentation (README, setup.py, or supplementary materials) to extract all pinned package names and their exact version numbers. For each dependency, create a single line in requirements.txt using the format 'package==version', listing all eight packages with pinned versions. Validate the requirements.txt syntax and confirm compatibility with the target Python version (e.g., Python 3.6.12) using a dependency resolver tool such as pip-compile or pipdeptree. Finally, generate both requirements.txt (pip) and environment.yml (Conda) formats to maximize reproducibility across different package managers and operating systems.3940## Related tools4142- **Python** (Runtime environment; version 3.6.12 specified as requirement)43- **Keras** (Deep learning library dependency; version 2.2.0 pinned)44- **TensorFlow** (Backend for Keras; version 1.8.0 pinned)45- **numpy** (Numerical computing dependency; version 1.15.4 pinned)46- **scikit-learn** (Machine learning library dependency; version 0.23.2 pinned)47- **scipy** (Scientific computing dependency; version 1.0.0 pinned)48- **seaborn** (Visualization library dependency; version 0.9.0 pinned)49- **Pandas** (Data manipulation dependency; version 1.1.1 pinned)50- **h5py** (HDF5 file format handling dependency; version 2.7.1 pinned)51- **pip-compile or pipdeptree** (Dependency resolver tool for validating version compatibility)5253## Evaluation signals5455- requirements.txt file exists and contains all nine dependencies (Python 3.6.12 plus eight packages) with format 'package==version'56- Syntax validation passes: no malformed lines, all version specifiers are recognized by pip57- Dependency resolver confirms no version conflicts when installing against Python 3.6.12 target58- environment.yml (Conda format) successfully parses and lists equivalent pinned versions59- Freshly installed environment from requirements.txt produces identical package versions to documented specification6061## Limitations6263- Python 3.6.12 is deprecated and no longer receives security updates; users may encounter platform incompatibility or security vulnerabilities when using this old environment.64- Some pinned versions (e.g., TensorFlow 1.8.0) are incompatible with modern CUDA versions, limiting reproducibility on newer hardware.65- Windows and macOS may have different binary availability for old package versions; platform-specific dependency resolution may fail silently.6667## Evidence6869- [other] The massNet implementation requires Python 3.6.12, Keras 2.2.0 with Tensorflow 1.8.0 backend, and eight pinned dependency packages: numpy 1.15.4, sklearn 0.23.2, scipy 1.0.0, seaborn 0.9.0, Pandas 1.1.1, and h5py 2.7.1.: "Python 3.6.12, Keras 2.2.0 with Tensorflow 1.8.0 backend, and eight pinned dependency packages: numpy 1.15.4, sklearn 0.23.2, scipy 1.0.0, seaborn 0.9.0, Pandas 1.1.1, and h5py 2.7.1"70- [other] Generate a requirements.txt file listing each dependency with its pinned version in the format 'package==version'.: "Generate a requirements.txt file listing each dependency with its pinned version in the format 'package==version'"71- [readme] We have implemented our machine learning model using the following software items: 1- Python(3.6.12) 2- Keras (2.2.0) with a Tensorflow(1.8.0) backend. 3- Packages: numpy(1.15.4), sklearn(0.23.2), scipy(1.0.0), seaborn (0.9.0), Pandas(1.1.1.), and h5py(2.7.1): "Python(3.6.12) 2- Keras (2.2.0) with a Tensorflow(1.8.0) backend. 3- Packages: numpy(1.15.4), sklearn(0.23.2), scipy(1.0.0), seaborn (0.9.0), Pandas(1.1.1.), and h5py(2.7.1)"72- [other] Validate the requirements.txt syntax and confirm all listed versions are compatible with Python 3.6.12 using dependency resolver tools.: "Validate the requirements.txt syntax and confirm all listed versions are compatible with Python 3.6.12 using dependency resolver tools"73- [other] Export environment specification in both requirements.txt and environment.yml (Conda) formats for reproducibility across platforms.: "Export environment specification in both requirements.txt and environment.yml (Conda) formats for reproducibility across platforms"