Creating an environment for Python script visuals on the Power BI service
As already mentioned, Python script visuals published on the Power BI service run on a pre-installed Python engine on the cloud, the version of which may change with new releases of the Power BI service itself. Should you need to share a report containing a Python visual with colleagues, you need to be sure that your Python code works correctly on the pre-installed engine.
TIP
We strongly recommend that you also create on your machine an environment with the same version of Python that is used for Python visuals by the Power BI service.
Keep in mind that these limitations would not be there if your reports using Python visuals were not to be shared and you only used them through Power BI Desktop. In this case, it is the engine on your machine that is used for the visuals.
To create the new environment, you must check which versions of both Python and the allowed packages are supported...