-
Notifications
You must be signed in to change notification settings - Fork 8
HowTo Create and Update Requirements File
Two tools and steps are required to create the requirements file. First, the requirements file will be built based on the imports of the source code. Then, the sub-dependencies are included to allow an offline installation and make the dependencies more secure.
The project pipreqs is used to determine all requirements of SPPMon.
- Please install it using
pip3 install pipreqs
- Create a copy of the existing requirements file:
cp ./python/requirements.txt ./python/requirements-copy.txt
- Overwrite the existing requirements file:
pipreqs --force --mode no-pin ./python/
- Add manual requirements to the file using nano (or vim), as they are not detected automatically:
nano ./python/requirements.txt
Refer to the copied version if any more versions need to be added:cat ./python/requirements-copy.txt
pandas-stubs
openpyxl
pyxlsb
pip
This requirement file does not contain any version numbers.
The command pip-compile
, supplied by the pip-tools project, is used to list all sub-requirements of the just-created requirements file.
-
Please install it using
pip3 install pip-tools
-
Execute it on the existing requirements file, locking all version numbers:
pip-compile -U --allow-unsafe ./python/requirements.txt
-
Add the manual requirements as a comment at the top of the file using nano (or vim):
nano ./python/requirements.txt
# manually added # pandas-stubs # openpyxl # pyxlsb # pip ####
The requirements file is now finished.
Compare again if any manually added requirements are missing from the copied file: cat ./python/requirements-copy.txt
If not, delete the copied file: rm ./python/requirements-copy.txt
- Home
- Frequently asked Questions
- Overview of users
- Contact us
- Share Snapshots of Grafana
- SPPMon Command line arguments
- SPPCheck Command line arguments
- SPPCheck Export PDF Report
- Install Overview
- System Requirements
- Getting SPPMon Source Code
- Create dedicated user accounts in SPP server, vSnap, and VADP
- Create grafana users
- Import Grafana Dashboards