SYSTEM$RESOLVE_PYTHON_PACKAGES

functiondeferredUDFs, procedures, tasks, alerts, scripting

docs.snowflake.com ↗

System functions

Returns a list of the resolved dependencies and their versions for the Python packages that were specified. This function works with packages from both Anaconda and Artifact Repository (PyPI).

Syntax

supportedpartialnot supportednot scored

SYSTEM$RESOLVE_PYTHON_PACKAGES( '<python_version>', '<package_spec_string>' [ , '<artifact_repository_name>' ] )

Parameters

NameRequiredDescription
python_versionrequiredString specifying the version of the Python runtime (e.g., ’3.12’).
package_spec_stringrequiredString containing package specifications in PACKAGES clause format, for example, $$('numpy', 'pandas')$$. Use $$()$$ to return only base packages (Python runtime and its dependencies).
artifact_repository_namerequiredOptional. String specifying the artifact repository name (e.g., ‘snowflake.snowpark.pypi_shared_repository’). If not provided or empty, uses the default Anaconda repository.

Returns

Returns a JSON array that contains the resolved packages and their dependencies. Each element in the array is a string in the following format: <package_name>==<version_name>. The result always includes base packages (e.g., Python runtime and system libraries).

Usage notes

Access control requirements

This function can be called by any user. No special privileges are required.

See also

- SHOW_PYTHON_PACKAGES_DEPENDENCIES - Returns dependencies for Anaconda packages only (requires ACCOUNTADMIN role) - Packages policies - Packages policies for Python - Using third-party packages - Using Python packages in UDFs

Known gaps

Parts not fully supported, and recorded divergences from Snowflake.