> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/zerve-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/zerve-docs/environments/environments.md).

# Environments and packages

The packages and settings your code runs with, and how to add your own.

An **environment** is everything your code runs with: the language version, the Python or R packages, any Linux system packages, and environment variables. Each block runs in an environment, so every run has exactly the packages it needs.

## What an environment contains

| Part                      | Examples                                                              |
| ------------------------- | --------------------------------------------------------------------- |
| **Python or R packages**  | pandas, scikit-learn, PyTorch; or tidyverse, forecast                 |
| **Linux packages**        | System libraries some packages need, such as GDAL for geospatial work |
| **Environment variables** | Settings your code reads at run time                                  |

From this definition, Zerve builds an image that your blocks run in. Zerve also adds a few packages it needs to run your code; these are hidden from your package list.

## Languages

| Language   | Version                                         |
| ---------- | ----------------------------------------------- |
| **Python** | Python 3.11, with packages installed using `uv` |
| **R**      | R 4.5                                           |

## Starting points

You don't have to start from scratch. Zerve includes **presets** for common kinds of work, such as machine learning, deep learning on GPUs, natural language processing and geospatial analysis. See [Environment presets](/zerve-docs/environments/environment-presets.md).

## Adding packages

Add packages to the environment your notebook uses, and Zerve rebuilds it. You can also ask the agent to do it: in Evolve Mode, an environment setup specialist installs packages and waits for the build to finish. See [Specialists](/zerve-docs/agents-in-the-workspace/evolve-mode/specialists.md).

When you add a package, you can specify a version, such as `pandas==2.2.2` or `pandas>=2.0`, to make sure the environment is the same every time it's built.

{% hint style="info" %}
Pin the versions of packages your results depend on. That way, rebuilding the environment later won't change your results.
{% endhint %}

## Default environments

Each organization can set **one default environment per language**, used for new notebooks. Admins set these up from **Executor Images**. See [Executor images](/zerve-docs/environments/executor-images.md).

## Environments and compute

The environment decides what software a block has; its [compute type](/zerve-docs/compute/compute-types.md) decides what hardware it runs on. For GPU work you need both: GPU compute, and an environment with GPU-enabled libraries.

## Self-hosted and air-gapped installs

When your organization runs Zerve in its own environment, environments can be built from your own package mirrors and container registries, so builds work without internet access. See [Self-managed installs](/zerve-docs/self-hosting/self-managed.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zerve.ai/zerve-docs/environments/environments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
