Installing the Required Version of Python

The Snowflake Connector for Python requires Python 3.6, 3.7, 3.8, or 3.9 to ensure that critical security fixes have been applied. In particular, PEP-476 is required to ensure the Snowflake Connector for Python can 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 has the package that includes Python 3.6, 3.7, 3.8, or 3.9, 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 Python 3.6, 3.7, 3.8, or 3.9 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.