Installing the Python Connector¶
Important
pip install --upgrade snowflake-connector-python installs version 5.x. Snowpark for Python, Snowflake ML, Snowflake SQLAlchemy, and Snowflake CLI still require a connector version before 5.0. Upgrading a shared environment can make those libraries fail to install or to import. Check the pins in Upgrade steps before you upgrade.
To install the latest Python Connector for Snowflake, use:
Note
Pin a release before 5.0 if you need the previous connector, for example snowflake-connector-python>=4,<5.
You can download the package files directly from PyPI.
Note
Before version 5.0, the connector was published from snowflake-connector-python.
Prerequisites¶
Requires Python 3.11 or later. Wheels are published for CPython 3.11, 3.12, 3.13, and 3.14.
For a list of the operating systems supported by Snowflake clients, see Operating system support.
Installing a FIPS-supporting version¶
Note
These instructions work only for version 5.0 and later.
Before you build or use a FIPS-supporting version, review FIPS 140-3 considerations for drivers built on the Universal Core. That page describes the AWS-LC FIPS module, known deviations, behavior differences, common build requirements, verification, and SBOM responsibilities for drivers built on the Universal Core.
A FIPS-supporting version links the FIPS module into the connector. Install it from the PyPI source distribution. Prebuilt wheels are standard builds, and pip install uses a wheel by default. SNOWFLAKE_FIPS is read only while pip builds that unpacked source distribution. Building from a git checkout, including an editable install or a wheel build from that checkout, fails if the variable is set.
Pass --no-binary for this package so pip downloads the source distribution and builds it. The flag names the distribution, snowflake-connector-python, and doesn’t apply to dependencies. On Linux and macOS:
On Windows, set the variable in PowerShell, then run the same install:
This version doesn’t build on Windows on ARM. On Linux, the module is linked into the connector. On macOS and Windows, the install places the module’s shared libraries next to the connector.
Confirm the installed build without opening a connection:
The value is True for a FIPS-supporting version and False for a standard version. A true value means this process loaded that version and its TLS provider is the FIPS module. It does not mean that every cryptographic operation in the process uses that module, and it does not certify the connector.
A FIPS-supporting version needs Rust 1.94.1, a C++ compiler, curl, unzip, Go 1.25, Perl, and CMake 3. curl and unzip download the protobuf compiler. To use a compiler you already have, set PROTOC to the path of that protoc binary. CMake 4 isn’t supported.
The C++ compiler depends on the platform:
- On Linux, use GCC 13. GCC 14 and GCC 15 fail to build the module. Install
gcc-13andg++-13, then setCC=gcc-13andCXX=g++-13for the install command. On Linux ARM64, also setCFLAGS=-fno-jump-tablesandCXXFLAGS=-fno-jump-tables. - On macOS, use Apple Clang. Set
CC=clangandCXX=clang++. - On Windows x64, use MSVC, Ninja, Perl, NASM, and LLVM Clang. Set
LIBCLANG_PATHto the directory that containslibclang.dll. Put the MSVC directory that containslink.exeahead of otherlink.exeprograms onPATH. If you use Strawberry Perl, putC:\Strawberry\perl\binonPATHand leaveC:\Strawberry\c\binoffPATH, because itsgccshadows MSVC.