Forum Discussion
Importing data in Snowflake using Python script
- 4 years ago
Thank you for your response..
As I had mentioned before, my Python version and execution is working fine.
I was able to resolve the issue by invoking the Power BI app from Python environment from Anaconda command prompt using below-
(python37) C:\Users\<myuser>\AppData\Local\Microsoft\WindowsApps>PBIDesktopStore
Hi ashwini_bora ,
Do you know what version of Python your Anaconda environment is using? It seems will running into issues importing packages with 3.6 and 3.7.This error is due to VS not activating the conda environment before launching the python process.
Try to create a new conda env with Python 3.5:
conda create -n py35 anaconda python=3.5
Then pip installing relevant packages (I had issues with PowerBI recognizing conda installs):
conda activate py35
pip install matplotlib
pip install pandas
After this is complete, you need to point PowerBI to the new env.
Including steps for those less familiar:
File -> Options and Settings -> Options -> Python Scripting
Then add the Path to your new Env. Mine looks like:
"C:\ProgramData\Anaconda3\envs\py35"
details refer:
https://docs.snowflake.com/en/user-guide/python-connector-example.html
https://addendanalytics.com/blog/snowflake-dwh-connecting-to-python/
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien