Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Error when connecting python to PBI

 
Hi, Despite the fact that I do have Python installed when I'm trying to connect it to PBI I get an error message:
 
Unable to connect:

Details: "ADO.NET: Python script error.
Traceback (most recent call last):
  File "PythonScriptWrapper.PY", line 2, in <module>
    import os, pandas, matplotlib.pyplot
  File "C:\USERS\WAA302\APPDATA\LOCAL\CONTINUUM\ANACONDA3_5.3.1\lib\site-packages\pandas\__init__.py", line 19, in <module>
    "Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']
"

Can anyone help please?
  • Anonymous's avatar
    Anonymous
    7 years ago

    As I found out yestreday the issue was due to Power Bi not supporting Python 3.7. i had to created new env for py36 and it worked form there!

     

    Thank you

17 Replies

  • With the November 2019 release of PBIDesktop I see no issues running Python 3.7 from the Anaconda stack. All that is needed is to start PBIDesktop from within an activated conda environment and have the Python home directory configured in the Python scripting options.

     

    From the Anaconda Prompt run:

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

     

    • rainynights's avatar
      rainynights
      Helper II

      pkoetzing  I don't appear to have this option. I'm running Windows 10 Pro, and I just installed PBI Desktop as an App, so it doesn't seem to show up in any of my folders as a file. Is there a way to get around this regardless?

      • pkoetzing's avatar
        pkoetzing
        Advocate III

        Windows 10 Apps are stored in C:\Program Files\WindowsApps, so you can find the executable in something like

         

        C:\Program Files\WindowsApps\Microsoft.MicrosoftPowerBIDesktop_2.75.5653.0_x64__8wekyb3d8bbwe\bin\PBIDesktop.exe

        However, the WindowsApps folder is both hidden and protected, but with admin rights you can take over ownership like described e.g. in this article: https://www.maketecheasier.com/access-windowsapps-folder-windows-10/.

    • Anonymous's avatar
      Anonymous
      Not applicable

      I was getting the same problem, and the solution from pkoetzing  worked.

       

      Thank you so much!!

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    From what I am seeing in your error message, it looks like you are missing a Python package "numpy".

    • Anonymous's avatar
      Anonymous
      Not applicable

      Which doesn't make sense as I have it installed :

       

      • Minseven's avatar
        Minseven
        Helper I

        is you PATH environment match what you have in your options?

        to check your environement:

        1) Open the Python Shell and

        2) type:

        import sys
        print(sys.exec_prefix)