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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
RainAndSnow
Frequent Visitor

Python Visual not appearing for a simple python script

I'm getting a visual error when trying to run a simple python code. The code ran perfectly 2-3 years ago but I've revisisted my power bi file and the visual is getting a "Can't display this visual" message. My only line of code right now is importing some packages

 
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
 
Any possible reasonings for this?
1 ACCEPTED SOLUTION
RainAndSnow
Frequent Visitor

It's been resolved. Just had to redirect where my python was saved on my computer. For future people, these were my steps.

 

1. Find where your python is saved (Source used here.)

2. Using that path, go to power bi file, go to settings, go to options, go to Python scripting, make sure Python home directory is the same path as to where your python is saved.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @RainAndSnow,

I'm glad to hear you find the solution and sharing operations steps here, they will help other users who faced a similar issues.

Regards,

Xiaoxin Sheng

RainAndSnow
Frequent Visitor

It's been resolved. Just had to redirect where my python was saved on my computer. For future people, these were my steps.

 

1. Find where your python is saved (Source used here.)

2. Using that path, go to power bi file, go to settings, go to options, go to Python scripting, make sure Python home directory is the same path as to where your python is saved.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.