Install the Snowflake Connector for Python on Streamlit Community Cloud
The Snowflake Connector for Python is available on PyPI and the installation instructions are found in the Snowflake documentation. When installing the connector, Snowflake recommends installing specific versions of its dependent libraries. The steps below will help you install the connector and its dependencies on Streamlit Community Cloud:
Determine the version of the Snowflake Connector for Python you want to install.
Determine the version of Python you want to use on Streamlit Community Cloud.
To install the connector and the dependent libraries, select the requirements file for that version of the connector and Python.
Add the raw GitHub URL of the requirements file to your
requirements.txt
file and prepend-r
to the line. For example, if you want to install version2.7.9
of the connector on Python 3.9, add the following line to yourrequirements.txt
file:-r https://raw.githubusercontent.com/snowflakedb/snowflake-connector-python/v2.7.9/tested_requirements/requirements_39.reqs
On Streamlit Community Cloud, select the appropriate version of Python for your app by clicking "Advanced settings" before you deploy the app:
That's it! You're ready to use the Snowflake Connector for Python on Streamlit Community Cloud. ❄️🎈
Tip
As the Snowflake dependencies requirements files (.reqs
) contain the pinned version of the connector, there is no need add a separate entry for the connector to requirements.txt.
Additional resources:
- Installing the Python Connector
- Unable to Deploy streamlit app with snowflake-connector-python
- Prerequisite Python packages for the Snowflake Connector