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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.