Install & Compatibility
Where this runs
tested against v1.30.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✓ 44.1s
py 3.11
✕ build_error
✓ 37.35s
py 3.12
✕ build_error
✓ 34.15s
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✕ build_error
704MB installed
● package 704MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
connect_with_spark_session_builder
✓ from snowflake.snowpark_connect import connect_with_spark_session_builder
✗ from snowflake.snowpark_connect import connect_with_spark_session_builder
This quickstart demonstrates how to initialize a local Snowpark Connect session using `connect_with_spark_session_builder`, create a Snowpark session from it, and perform a basic DataFrame operation. It requires a Java Runtime Environment (JRE) to be installed and `JAVA_HOME` configured for Spark to run.
import os
from snowpark_connect.session import connect_with_spark_session_builder
from snowpark.types import StructType, StructField, StringType, IntegerType
# Create a local Spark session that emulates Snowpark behavior
# Ensure these JARs are compatible with your Spark and Snowflake versions.
spark_session = connect_with_spark_session_builder(
app_name="SnowparkConnectLocalApp",
config={
"spark.jars.packages": "net.snowflake:snowflake-jdbc:3.13.29,net.snowflake:spark-snowflake_2.12:2.11.0-spark_3.4",
"spark.jars.repositories": "https://repo1.maven.org/maven2"
}
)
# Use the Spark session to create a Snowpark session
session = spark_session.getOrCreateSnowparkSession()
# Example: Create a Snowpark DataFrame and show its content
schema = StructType([
StructField("name", StringType()),
StructField("age", IntegerType())
])
data = [("Alice", 30), ("Bob", 25)]
df = session.create_dataframe(data, schema=schema)
df.show()
session.close()
spark_session.stop()
Debug
Known issues
breakingSnowpark Connect has specific Python version requirements (currently >=3.10, <3.13). Using incompatible Python versions can lead to installation failures or runtime errors.fixEnsure your Python environment meets the `requires_python` specification. Consider using `pyenv` or `conda` to manage Python versions.
affects: <1.21.0, >1.21.1
gotchaA `java.io.IOException` or similar error indicating 'Cannot run program "java"' often means the `JAVA_HOME` environment variable is not set correctly, or Java is not installed or discoverable in your system's PATH.fixInstall a compatible Java Runtime Environment (JRE) or Java Development Kit (JDK) (e.g., OpenJDK 8 or 11) and set the `JAVA_HOME` environment variable to its installation directory.
affects: All versions
gotchaIncorrect or outdated `spark.jars.packages` values in the `config` dictionary can lead to runtime errors when Snowpark Connect tries to load Spark-Snowflake connector JARs, preventing proper emulation.fixRefer to the official Snowpark Connect documentation or GitHub README for the recommended `spark.jars.packages` values compatible with your desired Spark and Snowpark Python versions.
affects: All versions
gotchaIt's common to confuse imports: `snowpark_connect` provides the session *builder*, but core Snowpark objects like `Session`, `DataFrame`, and `functions` are imported directly from the `snowpark` library.fixAlways import `Session`, `DataFrame`, `functions` etc., from `snowpark` (e.g., `from snowpark.session import Session`), and `connect_with_spark_session_builder` from `snowpark_connect.session`.
affects: All versions
Upgrade
Version history
1.30.0latest on PyPI · released Jun 12, 2026
Audit
Dependencies
snowpark-pythonrequiredCore library that Snowpark Connect emulates for local execution.
pysparkrequiredThe underlying Apache Spark framework used for local execution.
findsparkoptionalAids in locating PySpark installations, especially in non-standard environments.