Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

What is the correct procedure for installing the Snowflake Python API

$
0
0

I would like to use Python to interact with my Snowflake account. To get started I am following the Getting started with the Snowflake Python API quickstart which clearly states to run the following commands:

python3 -m venv '.venv'source '.venv/bin/activate'pip install snowflake

Well I tried that then subsequently attempted to run the simplest of code, from snowflake.core import Root which I took from page 3 of the quickstart. It failed:

➜  ~ cd /tmp➜  /tmp mkdir test-snowflake➜  /tmp cd test-snowflake➜  test-snowflake python -m venv .venv && \  python -m pip install --upgrade pip && \  source .venv/bin/activateRequirement already satisfied: pip in /Users/jamiethomson/.pyenv/versions/3.11.2/lib/python3.11/site-packages (23.3.2)(.venv) ➜  test-snowflake pip install snowflakeCollecting snowflake  Using cached snowflake-0.5.1-py3-none-any.whl (1.4 kB)Collecting snowflake-core==0.5.1  Using cached snowflake_core-0.5.1-py3-none-any.whl (323 kB)Collecting snowflake  Using cached snowflake-0.5.0-py3-none-any.whl (1.3 kB)Collecting snowflake-core==0.5.0  Using cached snowflake_core-0.5.0-py3-none-any.whl (323 kB)Collecting snowflake  Using cached snowflake-0.4.0-py3-none-any.whl (1.3 kB)Collecting snowflake-core==0.4.0  Using cached snowflake_core-0.4.0-py3-none-any.whl (323 kB)Collecting snowflake  Using cached snowflake-0.0.4.tar.gz (2.4 kB)  Preparing metadata (setup.py) ... doneInstalling collected packages: snowflake  DEPRECATION: snowflake is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559  Running setup.py install for snowflake ... doneSuccessfully installed snowflake-0.0.4[notice] A new release of pip available: 22.3.1 -> 23.3.2[notice] To update, run: pip install --upgrade pip(.venv) ➜  test-snowflake python -c "from snowflake.core import Root"<string>:1: DeprecationWarning: This package has been renamed to snowflake_uuid and will be removed shortly. Please update immediately.Traceback (most recent call last):  File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'snowflake.core'; 'snowflake' is not a package

Screenshot to prove it:

Screenshot of commands and output

I have followed the commands exactly but they did not behave as advertised. I am assuming that this quickstart is out-of-date however it is linked to from the API documentation: Snowflake documentation > Developer > Snowflake Python API: Managing Snowflake objects with Python

I don't know what is wrong here. Can someone tell me the correct steps for using Snowflake's python API?


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>