Forum Discussion

spartanboy's avatar
spartanboy
Helper II
3 years ago
Solved

Error while running python script in power bi desktop

Hello, 'm trying to use python scripting in power bi. I am referring documentation: here and here; also confirming of installing appropriate packages in the folder,            I a...
  • LufengYuan's avatar
    3 years ago
     

    I had ever encountered the similar problem and found the following solution in  the link How to run Python Script on powerBI - Stack Overflow. Not sure if it works for your situation?

     

    If you are using Anaconda, it needs to be activated before you can use it. Simply open the Anaconda Prompt or run conda activate on the cmd prompt. Then start PBIDesktop from within the activated environment like:

    (base) C:\> "Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe"
    

    On Windows 10 you have to look for the PBIDesktop.exe in C:\Program Files\WindowsApps. Make sure the Python home directory (Anaconda3) has been added to the PBIDesktop global options in the Python scripting section too.