'How do i install snowflake.sqlalchemy in anaconda?
I'm trying to connect to snowflake in python. At present i am an unsuccessful. I have read forums on using the engine way i.e.:
url = URL(
account = 'xxxx',
user = 'xxxx',
password = 'xxxx',
database = 'xxx',
schema = 'xxxx',
warehouse = 'xxx',
role='xxxxx',
authenticator='https://xxxxx.okta.com',
)
engine = create_engine(url)
connection = engine.connect()
query = '''
select * from MYDB.MYSCHEMA.MYTABLE
LIMIT 10;
'''
df = pd.read_sql(query, connection)
but i get the error:
ModuleNotFoundError: No module named 'snowflake.sqlalchemy'
how do i install this module in anaconda? I cannot find how to get round this any other way i have read does not work
Solution 1:[1]
This worked for me:
conda install -c conda-forge snowflake-sqlalchemy
Solution 2:[2]
Even in an Anaconda environment you can use pip. Did you try pip install snowflake-sqlalchemy?
Solution 3:[3]
dont use import snowflake together with from snowflake.sqlalchemy
use only;
from snowflake.sqlalchemy import URL
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kevin Mc |
| Solution 2 | d.hoeffer |
| Solution 3 |
