Skip to content

Installation

YData SDK supports Python 3.10 to 3.14 and can be installed on Windows, Linux, or macOS.

Environment setup

Python environment

💡 Make sure your environment uses Python 3.10 to 3.14.

It is recommended to create a virtual environment before installing:

pyenv virtualenv 3.13 ydata
pyenv activate ydata
conda create -n ydata python=3.13
conda activate ydata

System prerequisites

The PDF quality report (SyntheticDataProfile.generate_report) and the DocumentGenerator render through headless Chromium, driven by Playwright. pip installs the Playwright package, but not the browser: download it once, with the same Python environment that has the SDK, after installing the SDK.

python -m playwright install --only-shell chromium
python -m playwright install --only-shell chromium

python -m playwright install --with-deps --only-shell chromium
--with-deps installs Chromium's system libraries with apt and needs sudo. On other distributions (RHEL, Amazon Linux, ...) install them with the system package manager: nss, atk, cups-libs, libdrm, libxkbcommon, mesa-libgbm, pango, alsa-lib.

--only-shell downloads only the headless build, which is all the SDK uses; drop it to get the full browser. No fonts are needed: the report ships its own fallback fonts.

Re-run after upgrades

Each Playwright release expects its own Chromium build. Run the command again whenever an SDK upgrade changes the Playwright version; otherwise rendering fails with Executable doesn't exist at ....

Restricted networks and shared machines

  • Behind a proxy, set HTTPS_PROXY before running the install.
  • Without access to the Playwright CDN, point PLAYWRIGHT_DOWNLOAD_HOST to an internal mirror.
  • For a shared or read-only install (Docker images, multi-user servers), set PLAYWRIGHT_BROWSERS_PATH to a shared folder, both when installing and when running.
  • In a Dockerfile, add RUN python -m playwright install --with-deps --only-shell chromium after the pip install.
  • On Databricks, run the install in a cluster init script; %pip installs only the Python package.

Chromium is only needed for the PDF report and document generation. Synthesizers, profiling, quality and connectors work without it.

Install YData SDK

pip install ydata-sdk

The base install ships no data connector drivers: it includes the local file connector and the connector classes, but not the client libraries of each cloud or database. Install only the connectors you need as flavours (pip extras):

Flavour Connectors Installs
s3 S3Connector boto3
azure AzureBlobConnector azure-storage-blob, azure-storage-file-datalake
azuresql AzureSQLConnector pyodbc (also needs the system ODBC Driver 17 for SQL Server)
google GCSConnector, BigQueryConnector google-cloud-storage, google-cloud-bigquery, google-cloud-bigquery-storage, pandas-gbq
mysql MySQLConnector pymysql[rsa]
postgresql PostgreSQLConnector psycopg2-binary (pre-built wheels, no PostgreSQL install needed)
snowflake SnowflakeConnector snowflake-connector-python, snowflake-sqlalchemy
databricks DatabricksLakehouse, DatabricksUnityCatalog databricks-sdk, databricks-sql-connector[sqlalchemy], delta-sharing
saphana SAPHANAConnector hdbcli (SAP Developer License), sqlalchemy-hana
all-connectors all of the above every flavour

Flavours can be combined:

pip install "ydata-sdk[snowflake,postgresql]"
pip install "ydata-sdk[all-connectors]"

LLM provider flavours

LLMSynthesizer, generate_schema and DocumentGenerator use the Workbench backend by default, which needs no flavour. To use a third-party provider instead, install its flavour:

Flavour Backend (backend=) Installs
openai openai openai
anthropic anthropic anthropic
gemini gemini google-generativeai
all-llm all of the above every LLM flavour

MCP server flavour

mcp installs the YData MCP server (ydata-mcp, pinned to the SDK version). It does not include any connector; add the flavours of the connections it uses, e.g. pip install "ydata-sdk[mcp,s3]". See MCP installation & configuration.

Connector, LLM and MCP flavours can be combined in a single install:

pip install "ydata-sdk[all-llm,snowflake,postgresql]"

Flavour prerequisites

Most flavours install pre-built wheels and need nothing else. The exceptions and what each one expects at run time:

Flavour Prerequisites
azuresql Microsoft ODBC Driver 17 for SQL Server (install instructions). On Linux and macOS also unixODBC: sudo apt install -y unixodbc / brew install unixodbc.
saphana None to install. hdbcli is distributed by SAP under the SAP Developer License, which is not an OSI open-source license: check its terms before redistributing it (e.g. in a container image).
databricks Outside a Databricks runtime, DatabricksLakehouse writes stage files through S3 or Azure Blob: add s3 or azure (pip install "ydata-sdk[databricks,s3]"). Inside the runtime, its clients are already available.
mysql None. MySQL 8 caching_sha2_password authentication is covered by pymysql[rsa].
postgresql None. psycopg2-binary ships its own libpq; no PostgreSQL client install is needed.
s3, azure, google, snowflake None. Credentials are passed when creating the connector.
openai, anthropic, gemini An API key for the provider, passed as subscription_key= or read from OPENAI_API_KEY, ANTHROPIC_API_KEY or GOOGLE_API_KEY.
Workbench (no flavour) A Workbench subscription key, passed as subscription_key= (and charging_code= for cost attribution). region= selects the Azure region; it defaults to North America.
mcp An MCP client and a connections profile; see MCP installation & configuration.

Synthesizers, profiling and quality need no flavour

Fitting and sampling work with the base install. A flavour is only needed to read from or write to a data source through a connector, e.g. synth.sample(n, connector=...) into Snowflake needs snowflake.

Missing flavour

Creating a connector whose flavour is not installed raises MissingConnectorDependency (an ImportError) with the exact command to run, e.g. pip install "ydata-sdk[google]".

Upgrading from an earlier version

  • To keep the previous behaviour, install ydata-sdk[all-connectors].
  • The PDF report no longer uses WeasyPrint: the Pango, Cairo and GDK-Pixbuf libraries (and GTK on Windows) are no longer needed. Install Chromium instead (see System prerequisites).
  • ydata-sdk[databricks] now installs only the Databricks connectors. It no longer pins the Databricks Runtime 17.3 versions of google-cloud-storage, google-cloud-bigquery-storage and pandas-gbq.
  • PostgreSQL uses psycopg2-binary, so libpq-dev or a local PostgreSQL install is no longer needed. A PostgreSQL install left over from earlier versions of this guide can be removed if nothing else uses it; otherwise keep it on the latest minor release, as pip does not update it.

Managed platforms

The base install is all you need to use the SDK on a managed platform. Add a flavour only when you read from or write to a data source through a connector; this keeps the install small and avoids replacing the packages the runtime already ships.

%pip install ydata-sdk
dbutils.library.restartPython()
Add databricks only to use DatabricksLakehouse or DatabricksUnityCatalog (%pip install "ydata-sdk[databricks]"). Data loaded with Spark and converted to pandas needs no flavour. DatabricksLakehouse stages writes through S3 or Azure Blob, whose clients the runtime already provides; outside Databricks add s3 or azure.

pip install ydata-sdk
Add snowflake only to use SnowflakeConnector (pip install "ydata-sdk[snowflake]").

pip install ydata-sdk
Add s3 only to use S3Connector (pip install "ydata-sdk[s3]").

Verify the installation

python -c "import ydata.connectors as c; print(sorted(c.CONNECTOR_EXTRAS.items()))"

To check that Chromium is available for the PDF report and document generation:

python -c "from playwright.sync_api import sync_playwright; p = sync_playwright().start(); b = p.chromium.launch(); print('Chromium OK'); b.close(); p.stop()"

The first command lists every connector with the flavour it needs. Creating a connector whose flavour is missing raises MissingConnectorDependency with the command to install it.