> ## 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.

# Prepare Environment

This example runs inside a *Conda* environment. The environment can be
automatically configured using the `conda_env_py3.yml` file found in the
*Python UDF* API repository.

1. In the same directory you cloned the API, change directory into the root
   folder of the *Python UDF* API repository:

   ```
   cd kinetica-udf-api-python/
   ```

2. Create the *Conda* environment, replacing `<environment name>` with the
   desired name:

   ```
   conda env create --name <environment name> --file conda_env_py3.yml
   ```

   <Info>
     It may take a few minutes to create the environment.
   </Info>

3. Verify the environment was created properly:

   ```
   conda info --envs
   ```

4. Activate the new environment:

   ```
   conda activate <environment name>
   ```

5. Install *PyGDF*:

   ```
   conda install -c numba -c conda-forge -c gpuopenanalytics/label/dev -c defaults pygdf=0.1.0a2
   ```

6. Install the *Kinetica Python API*:

   ```
   pip install gpudb~=7.2.0
   ```

7. Add the *Python UDF* API repo's root directory to the PYTHONPATH:

   ```
   export PYTHONPATH=$(pwd):$PYTHONPATH
   ```

8. Edit the `util/test_environment.py` script for the correct database url,
   user, and password for your *Kinetica* instance:

   ```
   URL = 'http://localhost:9191;CombinePrepareAndExecute=1;RowsPerFetch=20000'
   USER = 'admin'
   PASSWORD = 'admin123'
   ```
