Installing the Required Version of Python

The Snowflake Connector for Python requires one of the following supported versions of Python:

  • 3.6

  • 3.7

  • 3.8

  • 3.9

This requirement ensures that your Python installation includes critical security fixes. In particular, the Snowflake Connector for Python depends on PEP-476 to verify certificates from the server.

This topic provides helpful information for installing the required Python version. It does not provide full install instructions. For install instructions, see the Python documentation.

In this Topic:

Installing Python on Linux

If your Linux distribution includes a supported version of Python, install the python version using an appropriate package manager (i.e. yum/rpm or apt-get).

If your distribution does not have the package, download the tarball and build it as described in the following sections.

Building and Installing Python for CentOS

Follow the steps below to install the minimum supported version of Python (3.6.0):

  1. Download and build Python:

    sudo yum groupinstall development
    sudo yum install -y zlib-devel openssl-devel sliteq-devel bzip2-devel
    cd /tmp
    curl -o - | tar xfz -
    cd Python-3.6.0
    export PYTHON_TOP_DIR=~/python3.6.0
    ./configure --enable-shared --prefix=$PYTHON_TOP_DIR --enable-unicode=ucs4
    make install
  2. Set the environment variables for your new Python installation:

    export PYTHON_TOP_DIR=~/python3.6.0
    export PATH=$PYTHON_TOP_DIR/bin${PATH:+:${PATH}}
    python3 --version

    Make sure the version matches the version that you installed.

    Optionally include these environment variables in .bashrc or whatever in the initialization of shell so that you can use the new Python right after login.

  3. Install the latest version of pip3, a package management system used to install software packages. Then use it to install setuptools:

    curl -o - | python3
    pip3 install setuptools
    pip3 --version

    Make sure pip3 is located in ~/python3.6.0/bin.


If you install Python 3.6.0 in the system directory, set the environment variables accordingly.

Installing Python on Windows and macOS

The package for a supported version of Python for Windows and macOS should be available from the Python Software Foundation website.

Download and install it in the default location. pip and setuptools are bundled by default.

Back to top