installpythonpackage

Install a Python package.

Syntax

installpythonpackage(piparguments,inplace)

[status,message] = installpythonpackage(...)

Inputs

piparguments
Python package name or arguments to pip install command as a string. If pip command is "python -m pip install --upgrade numpy", piparguments is "-upgrade numpy". Refer to Python documentation for more information on pip install command input arguments.
Type: string
inplace
If true, installs the package inside the product installation directory. If false, installs the package at <user home directory>/.altair/Compose<version>/hwx/python. Optional argument. Default is false.
Type: logical

Outputs

status
Status of the package installed.
1
success
0
failure
Type: integer
Dimension: scalar
message
Description of package installation results.
Type: char
Dimension: string

Example

[status,message] = installpythonpackage('numpy')

status = 1
message = Requirement already satisfied: numpy in c:\program files\altair\2022.1\common\python\python3.8\win64\lib\site-packages (1.18.4)
You are using pip version 18.0, however version 20.3.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.