Ron Hughes
07/11/2025, 7:41 PMEncountered exception during execution: Exception('Error importing snowflake-connector-python. Please install it manually.')
Traceback (most recent call last):
File "/opt/prefect/nil_etl-prefect_deployment/src/flows/snowflake.py", line 54, in snowflake
import snowflake.connector
ModuleNotFoundError: No module named 'snowflake.connector'
Marvin
07/11/2025, 7:41 PMMarvin
07/11/2025, 7:41 PMsnowflake-connector-python
. Make sure you're not using just snowflake
or another variant.
2. Dependencies
Snowflake connector often needs additional dependencies. Update your work pool requirements to include:
snowflake-connector-python
cryptography
3. Version Specification
If you're still having issues, try specifying an exact version:
snowflake-connector-python==3.0.0
(Replace 3.0.0 with your desired version)
4. Verify Installation
Add a simple print statement at the start of your flow to verify the package version:
python
import pkg_resources
print(pkg_resources.get_distribution('snowflake-connector-python').version)
5. Alternative Import
If you're still experiencing issues, you can try adding a pre-command to your work pool configuration:
pip install --upgrade snowflake-connector-python
If these steps don't resolve the issue, you might want to:
1. Check if there are any conflicts with other packages in your requirements
2. Verify that your work pool has sufficient permissions to install packages
3. Consider using a custom Docker image with Snowflake pre-installed
Would you mind sharing your current requirements configuration from your work pool? That would help me provide more specific guidance.Jake Kaplan
07/11/2025, 7:42 PMsnowflake.py
which causes an import conflict with the snowflake packageRon Hughes
07/11/2025, 7:44 PMJake Kaplan
07/11/2025, 7:46 PMRon Hughes
07/11/2025, 7:47 PMpython3 -m src.flows.snowflake
which maybe helps me accidentally evade that.