Tool for updating your requirements.txt
to match the versions of the packages you currently have installed.
requirements.txt
to match the versions of the packages you currently have installed.- Version Comparison: Compares package versions in your
requirements.txt
with the installed versions. - Visual Feedback:
- Packages that are up to date appear in the
default color
, packages with different versions are highlighted inyellow
, and missing or uninstalled packages are shown inred
.
- Packages that are up to date appear in the
- Automatic Update: Optionally update your
requirements.txt
to reflect the installed package versions.
- Download the file from releases
- Run
main.bat
- Ensure you have Python 3.8+ installed.
- Clone the repository:
git clone https://github.com/PoyBoi/requirementsHelper
- Navigate to the project directory:
cd requirementsHelper
- Run
main.bat
(if you haven't already)
-
Navigate to the project directory (if you haven't already):
cd requirementsHelper
-
Run the script using Python:
python requirementsHelper.py
You will be prompted to enter a path to a requirements.txt
file or a directory containing one or more requirements.txt files. The tool will then:
- Compare the versions specified in the file with the versions installed in your environment.
- Display the comparison in a formatted table with color-coded statuses.
- Prompt you to update the requirements.txt file if discrepancies are found.
Enter the path to requirements.txt file or directory containing requirements.txt: </path/to/your/project>
Using requirements file: /path/to/your/project/requirements.txt
Comparing requirements.txt with installed packages:
------------------------------------------------------------------------------------
Package Required Installed Status
------------------------------------------------------------------------------------
python-dateutil 2.9.0.post0 2.9.0.post0 Up to date
pytz 2024.2 2024.2 Up to date
opencv-python 4.10.0.84 Not installed Missing
lxml 4.9.4 Not installed Missing
typing-extensions 4.12.2 Not installed Missing
python-dotenv 1.0.1 Not installed Missing
llama-index-llms-llama-cpp 0.4.0 Not installed Missing
llama-index-llms-huggingface 0.4.2 0.4.2 Up to date
In the output above (the following colors will show up in your command line, please imagine them here):
Yellow
indicates a package with a different version than required.Red
indicates a package that is missing or not installed.
Contributions are welcome! Please open an issue or submit a pull request if you have suggestions or improvements.