Managing packages and runtime

Snowflake Notebooks run inside a pre-built container environment optimized for scalable AI/ML development powered by Snowflake Container Runtime.

Python versions

Snowflake Notebooks support Python versions from 3.10 to 3.12. When creating a notebook service, select the Python version that best fits your workload requirements.

Pre-installed Snowflake Container Runtime packages

Snowflake Container Runtime version 2.2 includes approximately 100 packages and libraries that support a wide range of ML development tasks inside Snowflake.

The following sections list a curated subset of pre-installed packages (40 entries per environment) available for each Python version of Snowflake Container Runtime version 2.2.

Note

To view the full list of pre-installed packages for your current notebook environment, run pip freeze in a Python cell or in the notebook terminal.

CPU version 2.2

The following packages are available for each Python version of CPU version 2.2:

CPU Container Runtime Python 3.10 version 2.2 includes the following packages:

PackageVersion
absl-py2.3.1
aiobotocore2.26.0
aiohappyeyeballs2.6.1
aiohttp3.13.3
aiohttp-cors0.8.1
aioitertools0.13.0
aiosignal1.4.0
altair5.5.0
annotated-doc0.0.4
annotated-types0.7.0
anyio4.12.1
appdirs1.4.4
argon2-cffi25.1.0
argon2-cffi-bindings25.1.0
arrow1.4.0
arviz0.23.1
asn1crypto1.5.1
asttokens3.0.1
async-lru2.1.0
async-timeout5.0.1
attrs25.4.0
babel2.17.0
bayesian-optimization1.5.1
beautifulsoup44.14.3
bleach6.3.0
blinker1.9.0
boto31.41.5
botocore1.41.5
cachetools5.5.2
CausalPy0.5.0
certifi2026.1.4
cffi1.17.1
charset-normalizer3.4.4
click8.2.1
clikit0.6.2
cloudpickle3.1.1
cmdstanpy1.3.0
colorama0.4.6
colorful0.5.8
comm0.2.3

GPU version 2.2

The following packages are available for each Python version of GPU version 2.2:

GPU Container Runtime Python 3.10 version 2.2 includes the following packages:

PackageVersion
absl-py2.3.1
accelerate1.12.0
aiobotocore2.26.0
aiohappyeyeballs2.6.1
aiohttp3.13.3
aiohttp-cors0.8.1
aioitertools0.13.0
aiosignal1.4.0
airportsdata20250909
altair5.5.0
annotated-doc0.0.4
annotated-types0.7.0
anyio4.12.1
appdirs1.4.4
argon2-cffi25.1.0
argon2-cffi-bindings25.1.0
arrow1.4.0
arviz0.23.1
asn1crypto1.5.1
astor0.8.1
asttokens3.0.1
async-lru2.1.0
async-timeout5.0.1
attrs25.4.0
babel2.17.0
bayesian-optimization1.5.1
beautifulsoup44.14.3
blake31.0.8
bleach6.3.0
blinker1.9.0
boto31.41.5
botocore1.41.5
cachetools5.5.2
CausalPy0.5.0
certifi2026.1.4
cffi1.17.1
charset-normalizer3.4.4
click8.2.1
clikit0.6.2
cloudpickle3.1.1

Installing additional packages

Snowflake Notebooks provides flexible approaches for managing Python packages, ranging from fully managed runtimes to custom container images. Each option offers different tradeoffs in ease of use, governance, customization, and external connectivity. This guide compares the options and highlights the scenarios where each works best.

By default, the Snowflake Container Runtime provides a Python execution environment, preinstalled with ~100 popular DS/ML packages and 1st-party Snowflake packages such as snowflake-snowpark-python. It is optimized for Snowflake-managed CPU and GPU infrastructure and recommended for most users and general-purpose notebook workloads.

Additional ways of installing packages:

From uploaded files to Workspaces or StagesArtifact Repositories PreviewExternal Access Integrations (EAIs)Custom Images Preview
DescriptionInstall additional packages and import from .whl or .py files stored in Workspaces or Stages.The Snowflake-managed PyPI repo, or customer-managed, 3rd-party package repositories that can be optionally added. Supports package policies.EAIs allow secure connection to a defined list of network endpoints outside of Snowflake, including but not limited to external package repositories. When an Artifact Repo is selected, packages will not be installed via EAIs.Alternative to using the default Snowflake Container Runtime, you can build and manage your own container environments. If selected, it will be used as the base environment. Additional packages can be installed via uploaded files, artifact repos, or EAIs.
AccessibilityPrivate workspaces: Accessible by default. Shared workspaces or Stages: RBAC governed.RBAC governed. The Snowflake PyPI repo is accessible by the PUBLIC role by default.RBAC governed.RBAC governed.
Recommended ScenariosUse when you need additional packages not included in the default runtime or from private/curated repositories. A Shared workspace or a stage is recommended for storing files intended for shared usage amongst users / roles.Use when you need additional Python packages not included in the default runtime or from private/curated repositories, with package policy enforcement.Use when you need to access external package repositories or other network resources (such as internal PyPI servers, Artifactory, or GitHub) that are not available within Snowflake.Use when you require full customization and control over the container environment, including preinstalled system-level dependencies, custom security tooling, or standardized images across all notebook executions.
Ease of UseEasy. Simply upload .whl or .py files to a Workspace or a Stage. End users need to run !pip install and import commands.Easy. The Snowflake PyPI repo is available in all accounts by default. Other artifact repositories require admin setup. End users need to run !pip install to install specific packages.Harder. Requires setup and provisioning by account admin. End users need to run !pip install to install specific packages.Requires most effort to build and deploy (usually done by the admin / platform team). End users do not need to run any commands as long as the right custom image is selected. Images built on older versions may suffer feature and performance degradation. The initial startup of custom images may be slower.

From external repositories

After configuring External Access Integrations (EAIs) for secure repository access, you can install packages directly from external sources such as PyPI. Users have access to a comprehensive ecosystem of packages beyond the pre-installed runtime, ensuring secure connectivity to external repos.

You can run pip install in a Python cell or in the notebook terminal.

For more information, see Set up external access for Snowflake Notebooks.

From requirements.txt

You can specify and install required package versions in a requirements.txt file to ensure a consistent environment setup. Install them using the following command:

!pip install -r requirements.txt

Note

If the package version specified in requirements.txt conflicts with supported versions of the pre-installed packages, the Python environment may break. Validate compatibility before installing.

From Workspace files

You can download or build .whl or .py files, upload them to your workspace, and install or import them.

  • Wheel files (.whl): Upload the .whl file and install it:

    !pip install file_name.whl

    If the package contains dependencies that are not already installed, upload the complete dependency tree (either directly into Workspaces or to a stage). Alternatively, attach an EAI that allows access to a repository where the package can be downloaded (for example, PyPI).

  • Python files (.py): Modules stored in your workspace can be imported directly for sharing utilities and functions across notebooks. For example:

    from my_utils import my_func

From a Snowflake stage

Stages provide secure and governed package deployment by leveraging existing Snowflake data storage and governance controls for package files. Use the Snowpark session to retrieve package files from a Snowflake stage into the container environment for import and use. For example:

from snowflake.snowpark.context import get_active_session
import sys

session = get_active_session()
session.file.get("@db.schema.stage_name/math_tools.py", "/tmp")

sys.path.append("/tmp")
import math_tools

math_tools.add_one(3)

Runtime management

Runtime pinning

All notebook services are pinned to the Runtime selected at creation unless you explicitly change it by editing the service. For example, a notebook service created on Runtime 2.0 will not be automatically upgraded when new Runtime versions are released.

Runtime vulnerability scanning

Snowflake scans the Runtime images daily for security vulnerabilities. High or critical Common Vulnerabilities and Exposures (CVEs) are addressed by releasing new Runtime versions within 30 days of detection.

Existing notebook services can continue using Runtimes with detected CVEs. However, Runtimes with known CVEs cannot be selected when creating new notebook services.

Custom runtime

You can build and register your own custom container images for use with Notebooks and ML Jobs. Custom images let you include specific packages, meet compliance requirements, and ensure reproducibility across environments.

For more information, see Custom runtime images.