Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Can't Display Python Visual

Hi,

 

I am trying to build a simple python visual:

 

# dataset = pandas.DataFrame(Amount, Sales)
# dataset = dataset.drop_duplicates()

# Paste or type your script code here:
import matplotlib.pyplot as plt
import seaborn as sns
sns.lmplot(x='Sales',y='Amount',data=dataset)
plt.show()
 
When I run the visual, I get the following DLL error:
 

Feedback Type:
Frown (Error)

Timestamp:
2019-04-29T20:25:13.0966956Z

Local Time:
2019-04-29T15:25:13.0966956-05:00

Session ID:
ee9d6f3f-0fc0-45cb-8a10-d6cc728af6d6

Release:
April, 2019

Product Version:
2.68.5432.661 (19.04) (x64)

Error Message:
Python script error.
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 2, in <module>
import os, matplotlib.pyplot, uuid, pandas
File "C:\Users\robstov\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\__init__.py", line 141, in <module>
from . import cbook, rcsetup
File "C:\Users\robstov\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\cbook\__init__.py", line 33, in <module>
import numpy as np
File "C:\Users\robstov\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\__init__.py", line 140, in <module>
from . import _distributor_init
File "C:\Users\robstov\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\_distributor_init.py", line 34, in <module>
from . import _mklinit
ImportError: DLL load failed: The specified module could not be found.

 

 

I installed Anaconda as my python directory and Visual Studio Code as my IDE:

 

Python Script.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Figured it out. I guess Power BI does not support Python 3.6/3.7 currently, so I had to create an environment in Anaconda for Python 3.5.

 

This solved it

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Figured it out. I guess Power BI does not support Python 3.6/3.7 currently, so I had to create an environment in Anaconda for Python 3.5.

 

This solved it

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.