Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi all,
I try to import this Python code that works properly in Spyder (Python 3.7):
See this YouTube video: https://www.youtube.com/watch?v=0zveIwThlfE&t=145s (watch from 6:00min).
However, when I copy this code to PowerBI I get this error message:
My machine CMD tells me this:
Important to note: In Power BI I use the Python home directory as indicated in CMD. When I use Python code with only Panda's, Numpy or Matplotlib there are no issues at all in my Power BI Desktop.
Any idea what is wrong / how to solve?
Thanks in advance!!
Hi,
Try the below . It may help
Use "conda install scikit-learn" instead of conda install sklearn
Hi all,
I have tried to get this working (back in 2019). What I can remember is that this finally did not work.
I have not tried other options anymore.
Regards,
Filip
@FilipFireFlyBI have you found a solution to this? I am stuck as well. Everything works well besides the sklearn import. The above didnt work for me either.
I am also stuck in this as well. Are there any option
Hi @FilipFireFlyBI ,
Please modify your code like this and try again.
components = pd.DataFrame(list(zip(x.columns, coef)), columns = ['component', 'value'])
If it still doesn't work, please check your user environment variables:
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Lionel Chen,
Thanks for reply but both options did not work for me.
Regards,
Filip
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
82 | |
70 | |
49 |
User | Count |
---|---|
143 | |
125 | |
108 | |
60 | |
55 |