pixano_inference.utils.main
attempt_import(module, package=None)
Import specified module, or raise ImportError with a helpful message
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module |
str
|
The name of the module to import |
required |
package |
str
|
The package to install, None if identical to module name. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
ModuleType
|
Imported module |
Source code in pixano_inference/utils/main.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|