pythonpackagesnowflake-cloud-data-platform

Install Snowflake connector in python


I'm trying to install the snowflake connector but I get this error

ERROR: Microsoft Visual C++ 14.0 or greater is required.

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for snowflake-connector-python Failed to build snowflake-connector-python

ERROR: Failed to build installable wheels for some pyproject.toml based projects (snowflake-connector-python).

I already have installed a version greater than 14.0 it's 14.31.31103. But I also have other old versions like 10, 11 or 12. I think Visual Studio Code is taking those versions instead of the latest I have installed.

How can I change the version of Microsoft Visual C++ that Visual Studio Code is taking or if there is another way to install the package I need.

I'm using python 3.13.2.


Solution

  • The Snowflake Python Connector only has wheels for Python versions up to 3.12. So when you attempt to install it on Python 3.13, pip is downloading the source code and attempting to compile it. In order to compile successfully, you must use the exact same version of MSVC that was used to compile Python 3.13.

    Your easiest solution would be to revert to an earlier Python version such as 3.12. If you must continue with Python 3.13, you will need to make sure that the correct version of MSVC appears first in your system path so that the compile will use it.