Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Can not run Python script in powerbi desktop

I have create csv file named "dataset" and write a python script to import it to Powerbi desktop. When I get data in powerbi desktop and paste above script, PBI show the error as following: "Details: ...
  • v-xicai's avatar
    6 years ago

    Hi Anonymous ,

     

    According to the error message, you may install a package named "mkl-service", and then see if there will be other errors.

     

    There are also several points you may considerate for the Python data source:

     

    1.Try to install Python on your local machine,  download the latest version of Python from the Python website .

     

    2.Install required Python packages,

     

    pip install pandas
    
    pip install matplotlib

     

    3.Go to File > Options and settings > Options > Python scripting, enable Python scripting .

     

    4.When setting the working directory within the Python script, you must define a full path to the working directory, rather than a relative path

     

    5.When publish to Power BI Service, to refresh the Python data source, you may need to install the on premise data gateway (personal mode) .

     

    For reference:

     

    Run Python scripts in Power BI Desktop

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.