No module named 'snowflake.snowpark' from the code "from snowflake.snowpark import Session"

requirements.txt

streamlit
snowflake-connector-python == 3.0.3
matplotlib == 3.7.1
charset-normalizer==2.1.1
urllib3==1.26.15

This is my requirements.txt file. I already put snowflake-connector-python in the requirements.txt and it still didn’t work. Please provide any possible solutions!

Hi @Tan-Kok-Kai, and welcome to our forums!

It’s a bit difficult to diagnose without seeing the code, but are you importing the connector correctly?

The import statement should be:

from snowflake.snowpark import Session

Also, maybe:

  • Try upgrading to the latest version of the Snowflake connector in case there is a bug with the version you currently have installed (very unlikely, but worth a try!)

  • As a last resort, try uninstalling the connector fully with pip uninstall snowflake-connector-python and reinstalling it to see if that resolves any issues.

Again, if you could send me the code, I could diagnose more accurately. :blush:

Best,
Charly

Hi @Charly_Wargnier, thanks for replying!

I did import the snowflake correct and below are the pictures of my requirements.txt, importing codes and the error faced.


Screenshot 2023-08-08 172611
import

1 Like

I’ve passed it on to our developers. I’ll keep you posted as soon as possible.

Thanks for your patience.

Best,
Charly

Actually, it could help if you could pass us the full error log trace, as I’m trying to OCR your log error image, but the output is not amazing. :blush:

Thanks,
Charly

Actually, it could help if you could pass us the full error log trace, as I’m trying to OCR your log error image, but the output is not amazing. :blush:

Thanks,
Charly

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.