Forum Discussion

chulpanvl's avatar
chulpanvl
Helper I
4 years ago

Power Bi Service Error - Failed to update data source credentials: ADO.NET: python.exe not found

Hello everyone!

I am trying to schedule a refresh using Power BI Service for my dataset that contains Python script which is:

import pandas as pd

data = [['Alex',10],['Bob',12],['Clarke',13]]

df = pd.DataFrame(data,columns=['Name','Age'],dtype=float)

print (df)

I have a On-premises data gateway (personal mode) installed.

 

So far I’ve tried:

  1. To run a python script via anaconda virtual environment. This gives me an error (Importing the numpy C-extensions failed) even on PBI Desktop level.
  2. I tried creating virtual env with an older version of python (3.6), no luck, same error.
  3. I gave up on Anaconda and tried using default python env. I’ve changed a Python home directory (which is C:\Users\chz.vladimirova\AppData\Local\Programs\Python\Python310\) in Options and Settings in PBI Desktop accordingly. Script worked fine on PBI Desktop but data failed to refresh at PBI Service. For some reason PowerBI Service was still referring to Anaconda environment and was returning the same error message about numpy ImportError as earlier. Here is a community post addressing the same issue, there is no solution however.
  4. I uninstalled Anaconda from my computer. Now PBI Service doesn’t refer to anaconda env but returns an error: Failed to update data source credentials: ADO.NET: python.exe not found. python.exe was not found in the specified directory. Please make sure you have a complete Python installation.
  5. I tried using an older version of On-premises data gateway (personal mode) - from March 2020. Problem remains.

Privacy level of a source is set to Public both in PBI Service and PBI Desktop.

 

Python version: Python 3.10.2

Windows version: 21H1 Windows 10 Pro, Build 19043.1110

PBI Desktop version: 2.100.1401.0 64-bit

 

I am really confused. Any help is appreciated!

6 Replies

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Community Support

    Hi, chulpanvl 

     

    Not sure if the latest version of python is supported according to the doc. 

    More details:

    Learn which Python packages are supported - Power BI | Microsoft Docs

    Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Docs

    It is recommended to use an older version of python, and powerbi desktop and gateway can be downloaded the latest version normally. 

    I suggest you open the data source settings in desktop and delete the previous credentials and update it. Delete the original report in the service and re-publieh the report.

     

    You can create a simple sample file to see if there is a problem.

    Did I answer your question? Please mark my reply as solution. Thank you very much.
    If not, please feel free to ask me.

    Best Regards,
    Community Support Team _ Janey

      • v-janeyg-msft's avatar
        v-janeyg-msft
        Community Support

        chulpanvl 

         

        Are you using a normal python environment and using an older version of python? Does it refresh properly on the desktop? If not, please show a screenshot of the error message.

         

        Janey

         

  • v-janeyg-msft 

    Are you using a normal python environment - Yes, I uninstalled Anaconda and now using just a normal python env.

    and using an older version of python - Yes, I uninstalled 3.10 and reinstalled 3.7.7.

    Does it refresh properly on the desktop - Yes, it doesn't throw any error messages.

     

    In case If this info can help

    My Python path

     

    Data source settings 

    And a personal gateway seems to work properly

     

     

    • v-janeyg-msft's avatar
      v-janeyg-msft
      Community Support

      chulpanvl 

       

      If there is no problem now, you can mark the reply that is helpful to you and close this thread. Thank you.

       

      Best Regards,
      Community Support Team _ Janey

       

       

  • rmsl's avatar
    rmsl
    Frequent Visitor

    chulpanvl Have you managed to find a way around it by any chance? I am having the exact same issue.