This Python script provides a simple utility for installing Python libraries using pip
. It allows you to supply a list of libraries to be installed and includes the option to suppress output for cleaner installations.
- Bulk Library Installation: Install multiple Python libraries at once.
- Optional Output Suppression: Choose whether to hide or display installation logs.
- Error Handling: Captures and reports errors during the installation process.
- Customizable: Easy to integrate into other projects.
- Input List: The script takes a list of library names to be installed.
- Command Execution: Uses the
subprocess
module to callpip
and install the specified libraries. - Output Control: By default, suppresses
pip
's output (can be toggled). - Error Reporting: Raises exceptions if the installation process encounters errors.
Ensure you have Python 3.6 or newer installed.
Clone or copy the script to your local environment:
git clone https://github.com/ArneSoft/library-installer.git
cd library-installer
libs_to_install
(list): A list of library names to install.suppress_output
(bool): Whether to suppresspip
's output (default:True
).
- Python >= 3.6
pip
installed and properly configured in your environment.
You can modify the script to:
- Accept user input dynamically (e.g., via command-line arguments).
- Add additional error handling for specific use cases.
- Include version pinning for libraries (e.g.,
requests==2.28.1
).