Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
eeew00
Helper I
Helper I

Python 2 - Personal gateway

Hi guys,

 

I have a report that depends on Python 2, which refreshes without any issue in desktop.

 

When I upload the report and try refreshing the data, I get a refresh failure, pointing to syntax errors.

This is probably because the personal gateway is trying to refresh through Python 3 (tested in desktop and when switching to Py3 I get the same errors about syntax)

 

So, has anybody figured out how to run a personal gateway with Python 2?

 

Thanks in advance

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Do you have the luxury of removing Python3 from that computer?  If not, read up on how to specify the default path for Python.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Do you have the luxury of removing Python3 from that computer?  If not, read up on how to specify the default path for Python.

Thanks for your reply. Removing is sort of last resort, I'd rather change the path, which is also giving me some trouble:

in CMD - "where python" lists both versions, with 2.7 on top (correct?)

in CMD - "python -v", and just "python" both give me 2.7

 

Python 2.7 is on the top of Path in system variables

 

Am I missing something? Rebooted computer and gateway but still "Invalid Syntax"..

Ok guess what - I reuploaded the report to the service and that fixed it! (perhaps I had uploaded the latest version with PY3 selected in PBI desktop? Should that matter?)

In any case, Py2 on top of Path in system variables and afterwards reuploading the report with PY2 selected in Options in PBI desktop seems to have solved it.

 

Thanks very much for your help @lbendlin 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors