> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ALTER FUNCTION ENVIRONMENT

<a id="sql-alter-function-environment" />

Manages the installed Python packages associated with the given
[Python UDF/UDTF environment](/content/sql/udf/create-function-environment#sql-create-function-environment).
Packages are given as a space-separated list of names; and for installations, an
optional version number per package can be specified.

```sql title="ALTER FUNCTION ENVIRONMENT (Install Package) Syntax" theme={null}
ALTER FUNCTION ENVIRONMENT <environment name>
INSTALL PYTHON PACKAGE '<package name>[==<package version>] [...]>'
```

```sql title="ALTER FUNCTION ENVIRONMENT (Uninstall Package) Syntax" theme={null}
ALTER FUNCTION ENVIRONMENT <environment name>
UNINSTALL PYTHON PACKAGE '<package name> [...]>'
```

## Parameters

<AccordionGroup>
  <Accordion title="<environment name>" id="<environment-name>" defaultOpen>
    Name of the UDF environment to manage
  </Accordion>

  <Accordion title="<package name>" id="<package-name>" defaultOpen>
    Name of the Python package to install into or uninstall from the UDF environment
  </Accordion>

  <Accordion title="<package version>" id="<package-version>" defaultOpen>
    Version number of the Python package to install
  </Accordion>
</AccordionGroup>

## Examples

To install the `sentence-transformers` package into the Python UDF environment
`udfe_st`:

```sql Install Python Package Example theme={null}
ALTER FUNCTION ENVIRONMENT udfe_st
INSTALL PACKAGE 'sentence-transformers'
```

To uninstall the `sentence-transformers` package from the Python UDF
environment `udfe_st`:

```sql Uninstall Python Package Example theme={null}
ALTER FUNCTION ENVIRONMENT udfe_st
UNINSTALL PACKAGE 'sentence-transformers'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.