Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi- I am trying to import the data from Snowflake DB using the python script in Power BI and want to create reports using Python provided packages.
The complete script works well on Python IDE (Spyder), however getting error while importing as below-
Get Data --> Python Script
import snowflake.connector
<code to connect to Snowflake and fetch data>
Getting error on first line, while trying to import the snowflake connector, error:
Details: ADO.NET: Python script error. <pi>ImportError: DLL load failed: The specified module could not be found. </pi>
Python installation is fine and with other local data sources (from my desktop), it is working well.
Solved! Go to Solution.
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
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
@ashwini_bora Hi,
Try adding a blank query and paste your Python script and make sure you pass the right credentials.
Regards,
John Basha Mattipati,
https://www.linkedin.com/in/john-basha-mattipati-06812980/
User | Count |
---|---|
98 | |
91 | |
84 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |