pkg
thkit.pkg
¶
Functions:
-
check_package–Check if the required packages are installed.
-
install_package–Install the required package.
-
dependency_info–Get the dependency information.
check_package(package_name: str, auto_install: bool = False, git_repo: str | None = None, conda_channel: str | None = None)
¶
Check if the required packages are installed.
install_package(package_name: str, git_repo: str | None = None, conda_channel: str | None = None) -> None
¶
Install the required package.
Parameters:
-
package_name(str) –package name
-
git_repo(str, default:None) –git path for the package. Default: None. E.g., http://somthing.git
-
conda_channel(str, default:None) –conda channel for the package. Default: None. E.g., conda-forge
Notes
- Default using:
pip install -U {package_name} - If
git_repois provided:pip install -U git+{git_repo} - If
conda_channelis provided:conda install -c {conda_channel} {package_name}