pixano_inference.utils.package
Utility functions for working with Python packages.
assert_package_installed(package_name, error_message=None)
Assert that a Python package is installed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package_name
|
str
|
The name of the package to check. |
required |
error_message
|
str | None
|
The error message to raise if the package is not installed. |
None
|
Raises:
| Type | Description |
|---|---|
ImportError
|
If the package is not installed |
Source code in pixano_inference/utils/package.py
is_package_installed(package_name)
Check if a Python package is installed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package_name
|
str
|
The name of the package to check. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the package is installed, False otherwise |